Variable Value

G

Gordon Brown

Hi

I would like to know how one can sent the variable value to the sub.

At the moment I would get "File(0)" and not "Monday"

Dim File(4) As String

Sub Main()

File(0) = "Monday"
File(1) = "Tuesday"
File(2) = "Wednesday"
File(3) = "Thursday"

For i = 0 To 3 Step 1
Display ("File(" & i & ")")
Next
End Sub

Sub Display(Day)
MsgBox (Day)
End Sub

Thank you in advance
 
Top