Hi guys, it's that thick old Newbie again.
I'd like to achieve the following (syntactically incorrect) task of populating an array in a subroutine. I'm not bothered about the "invente" task, but I'm going a bit weird trying to find the syntax to pass an array definition to a subroutine, so that the subroutine can populate it.
Can anyone PLEASE help?
Sample (pointless) code below.
Sub TopLevel()
Dim ReturnedArray() As String
Dim EntryCount As Long
PopulateIt(ReturnedArray, EntryCount)
End Sub
PopulateIt(ReceivedString(), NumberOfEntries As Long)
Dim i As Integer
For i = 1 to 5
ReceivedString(i) = i * 3
Next I
NumberOfEntries = i
End Sub
Thanks in advance for taking the time to instruct a novice!
I'd like to achieve the following (syntactically incorrect) task of populating an array in a subroutine. I'm not bothered about the "invente" task, but I'm going a bit weird trying to find the syntax to pass an array definition to a subroutine, so that the subroutine can populate it.
Can anyone PLEASE help?
Sample (pointless) code below.
Sub TopLevel()
Dim ReturnedArray() As String
Dim EntryCount As Long
PopulateIt(ReturnedArray, EntryCount)
End Sub
PopulateIt(ReceivedString(), NumberOfEntries As Long)
Dim i As Integer
For i = 1 to 5
ReceivedString(i) = i * 3
Next I
NumberOfEntries = i
End Sub
Thanks in advance for taking the time to instruct a novice!