Variable Value

  • Thread starter Thread starter Gordon Brown
  • Start date Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top