I have been searching the forum for methods on creating an array that can be used throughout the program, once declared after the initial load. I found the thread thread222-264326 but his method has not been explained thoroughly, so please, if you may, explain how he created a "public" array?
I have the following code to retrieve the data from a text file that contains 20-odd lines of versions:
I would like to make the array (VersionVariable) available to the whole program. Putting it within the many places had produced an error message: "Constants, fixed-length strings, arrays, user-defined types and Declare statements not allowed as Public of object modules" or "Sub or Function not defined". Many thanks, James.
I have the following code to retrieve the data from a text file that contains 20-odd lines of versions:
Code:
Dim VersionVariable() As String
ReDim VersionVariable(0)
Open "C:\Documents and Settings\James\My Documents\BackupCD\Programs\version.txt" For Input As #1
Do Until EOF(1)
Line Input #1, VersionVariable(UBound(VersionVariable))
ReDim Preserve VersionVariable(UBound(VersionVariable) + 1)
Loop
Close #1