AnyOldName
New Member
- Joined
- May 18, 2019
- Messages
- 8
I normally use a string variable (Var_MsgText) as an input to message boxes but I'm currently writing my biggest piece of code to date that has multiple subs that all use message boxes. I don't want Var_MsgText to be a public sub as that would risk incorrect carry over of the content between different subs so the two approaches I'm considering are:
Approach 1: Var_MsgText1 in one sub, Var_MsgText2 in the next sub etc, that this means creating more variables but maybe I'm worrying about nothing
Approach 2: Have a single variable name (Var_MsgText) that's used in multiple subs but re-declaring it at the beginning of each sub so that its empty, is that possible or will it cause problems?
Approach 3: Someone gives me a better idea than 1 or 2
Thanks in advance.
Approach 1: Var_MsgText1 in one sub, Var_MsgText2 in the next sub etc, that this means creating more variables but maybe I'm worrying about nothing
Approach 2: Have a single variable name (Var_MsgText) that's used in multiple subs but re-declaring it at the beginning of each sub so that its empty, is that possible or will it cause problems?
Approach 3: Someone gives me a better idea than 1 or 2
Thanks in advance.