-
I have the procedure
Private Sub PopulateSupplier(storage() As clsMRItem)
End Sub
If I try and reference storage(x).something as the first thing I do, it works just fine.
If, on the other hand I were to add these 2 lines into the procedure,
Public LineNo As Integer
Public Offset as Integer
I am unable to reference storage(x).something.
Unless I am way off the mark, those 2 lines of code should nto do anything of the sort. I have no other variables with those names (global or otherwise). If you have seen something like this, please let me know what's going on.
-
Try this...
To make them local variables, try using Dim instead of Public...
Code:
Private Sub PopulateSupplier(storage() As clsMRItem)
Dim LineNo As Integer
Dim Offset As Integer
' The rest of the sub code...
End Sub
Or, if you want them to be public try putting them in the declarations section at the top of the form's code or a module's code.
Code:
Option Explicit
Public LineNo As Integer
Public Offset As Integer
______________________________________________________
Private Sub PopulateSupplier(storage() As clsMRItem)
' The rest of the sub code...
End Sub
Good luck!
-
Thanks... I tried that right after I posted and it worked fine.