Hi...
My Calling Statement:
Call CheckFields(5,1,3,4,2,7)
I have the following code in a Module
Public Sub CheckFields(NumberOfColumns, SearchColumn1, SearchColumn2, SearchColumn3, SearchColumn4, SearchColumn5)
Dim TargetColumns As Variant
ReDim TargetColumns(NumberOfColumns - 1)
For i = 0 to NumberOfColumns -1
TargetColumns(i) = ?????
Next
.
.
.
End Sub
I tried using SearchColumn & i + 1 at the ????? but all I get in my array are the values 1 through 5 and not what is contained in SearchColumn 1 thru SearchColumn5.
Is there a way to loop through the names of the SearchColumn's defined in the Sub statement?
Thanks
My Calling Statement:
Call CheckFields(5,1,3,4,2,7)
I have the following code in a Module
Public Sub CheckFields(NumberOfColumns, SearchColumn1, SearchColumn2, SearchColumn3, SearchColumn4, SearchColumn5)
Dim TargetColumns As Variant
ReDim TargetColumns(NumberOfColumns - 1)
For i = 0 to NumberOfColumns -1
TargetColumns(i) = ?????
Next
.
.
.
End Sub
I tried using SearchColumn & i + 1 at the ????? but all I get in my array are the values 1 through 5 and not what is contained in SearchColumn 1 thru SearchColumn5.
Is there a way to loop through the names of the SearchColumn's defined in the Sub statement?
Thanks