T
T2B
Can I pass values (e.g. a concatenated string of days) to an array
from another function?
This sub works:
Sub xArray1()
Dim MyWeek, MyDay
MyWeek = Array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
For Each MyDay In MyWeek
Debug.Print MyDay
Next MyDay
End Sub
How could I make something like this work?
Sub xArray2(MyWeekValues as Variant)
Dim MyWeek, MyDay
MyWeek = Array(MyWeekValues)
For Each MyDay In MyWeek
Debug.Print MyDay
Next MyDay
End Sub
from another function?
This sub works:
Sub xArray1()
Dim MyWeek, MyDay
MyWeek = Array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
For Each MyDay In MyWeek
Debug.Print MyDay
Next MyDay
End Sub
How could I make something like this work?
Sub xArray2(MyWeekValues as Variant)
Dim MyWeek, MyDay
MyWeek = Array(MyWeekValues)
For Each MyDay In MyWeek
Debug.Print MyDay
Next MyDay
End Sub