Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50167

How do I pass a variable and an array to another sub?

$
0
0
Hi all, quick question with hopefully a simple answer.

I'm trying to pass a variable and an array from one sub to another. I've got the variable passed over ok, but I can't find out how to pass the array as well:

Code:

Sub 1()
    Dim day As String
    Dim backlog(1 To 100) As Integer
    ...
    CopyBacklog day
End Sub

Code:

Sub CopyBacklog(day As String)
...
End Sub

How do I pass the "backlog" array across as well as the "day" variable?

Viewing all articles
Browse latest Browse all 50167

Trending Articles