I'm new to stackoverflow and currently in real need of help.
I'm fighting since several days with an array of strings, which i declare as public or even private in a module.
Public unitTypes(1 To 3, 1 To 4) As String
In my first Sub in that particulare module I write several Strings into that array.
Public Sub WriteBoxes()
[...]
unitTypes(1, 1) = "Durchschnitt"
unitTypes(2, 1) = "avg"
unitTypes(1, 2) = "Maximum"
unitTypes(2, 2) = "max"
[...]
If I test it via MsgBox at the end of the Sub, all the strings are still in the array.
Public Sub DeleteData()
[...]
MsgBox unitTypes(1, 2)
[...]
But if i want to read any of that strings in another Sub in the same module the strings are lost and I just have an empty ("") array.
Can anybody tell me what am I missing?
Thanks for your help in advance, Daniel
WriteBoxessub? you are testing(1,2)item- are you written any value there while I can see you set(2,1)item but not(1,2).