Hello,
I have a Sub,
Public Sub C-Main_Click()
‘
‘ Lines of code.
‘
Then I declare this and open the file:
I have 3 other subs under the same Form and I must access this previously open DDDCode:ReDim DDD(TotXLin, 16) As Integer sFilename = FtR nFileNum = FreeFile Open sFilename For Binary As #nFileNum Get #nFileNum, , DDD Close #nFileNum ‘ ‘ more code, ‘ For NbRow = 1 To 16 Sstr = Sstr & " " & DDD(NbLin, NbRow) Next NbRow……. and so ….more code…. all this works fine.
and work on the same declared array.
How can I access all ready opened DDD in this Public Sub without opening the file every time
in every other sub and declaring the array when activated by a click.
I have tried place the array declaration and the opening part in the module, call it,
but that does not seems to work for me. Declaring dynamic array every time create me a problem.
Any suggestion would be appreciated.




Reply With Quote