For variables in the same project (Excel file with all the modules, worksheets, userforms), you just basically declare the variable as a public variable in a standard module, which means at the top before any subs or functions and with the keyword Public:
Code:
Public gstrMyName as String
Sub UseIt()
Msgbox gstrMyName
End Sub
I use prefix conventions for public and private variables (variables with scope outside the current procedure):
g for global variable - project level scope
p for private variables - module level scope
Followed of course by the datatype:
i.e.
pintNumber = a private integer,
gblnTrueOrFalse = a public boolean,
plngCount = a private long,
etc. etc.
I guess for reasons I don't understand I usually don't use prefixes for arrays, but if I did I think I'd use arr, I.e. arrMyArray or garrMyArray / parrMyArray - I suppose its in the nature of array variables that they are easily recognized by the manner of their use...
AB
HTH