Can someone explain what am I doing wrong here. Excel doesn't seem to set the variable value if I run the second macro before the first one. I would like to set the values just once and use them in multiple macros. I have 6 macros that will be using the same values. The code included below is a short code I use to test.
Option Explicit
Dim Test As String
Sub sub1()
Test = "Test"
MsgBox Test
End Sub
Sub sub2()
MsgBox Test
End Sub
This is the popup i get if the second macro is executed before the first one.
