T
Tony Wainwright
Hi Guys,
I need some help in passing arrays to procedures. In my main event I have create an array as in:
Dim Harry(1) as String
Call MyProcedure (Harry)
I then need to pass this array to a procedure (ByRef) as I need to change the size of the array and populate it
Public Sub MyProcedure(ByRef Harry As String)
'Get vC
Redim Harry(vC) as string
For vIndex = 0 to vC -1
Harry(vC) = 'Something
Next
End Sub
What I am getting is a Compile Error: Expected Array at the line that ReDims the Array.
Can anyone tell me where I'm going wrong?
Tony
I need some help in passing arrays to procedures. In my main event I have create an array as in:
Dim Harry(1) as String
Call MyProcedure (Harry)
I then need to pass this array to a procedure (ByRef) as I need to change the size of the array and populate it
Public Sub MyProcedure(ByRef Harry As String)
'Get vC
Redim Harry(vC) as string
For vIndex = 0 to vC -1
Harry(vC) = 'Something
Next
End Sub
What I am getting is a Compile Error: Expected Array at the line that ReDims the Array.
Can anyone tell me where I'm going wrong?
Tony