Im trying to call a function and reference dictionary data from the sub. I just cant seem to declare the vrnHistory dictionary as a global resource. Ive stripped to the code down but the basics are below. I want to achive the MsgBox displaying the string is A1.
I know I need to dim vrnHistory as public but i cant make it work.
Any help much appreciated !
Public Sub GlobalTest()
Set vrnHistory = CreateObject("Scripting.Dictionary")
vrnHistory.Add "A1", "This is dictionary Data for global share"
FN_GlobalTest
End Sub
Public Function FN_GlobalTest()
MsgBox "Within Function called from SUB " & vrnHistory("A1")
End Function
I know I need to dim vrnHistory as public but i cant make it work.
Any help much appreciated !
Public Sub GlobalTest()
Set vrnHistory = CreateObject("Scripting.Dictionary")
vrnHistory.Add "A1", "This is dictionary Data for global share"
FN_GlobalTest
End Sub
Public Function FN_GlobalTest()
MsgBox "Within Function called from SUB " & vrnHistory("A1")
End Function