There are a number of ways to do this. Are you using a userform? You could
maybe use the TAG property of one of the controls. You could use document
variables as well in the same way. You could also use a "global" variable as
you've suggested.
You should also pay attention to ByRef and ByVal for parameters. The default
is ByRef and this means that if you change the value of a parameter in a
subroutine then it's changed in the calling routine as well.
What do you actually want to do?