RAYLWARD102
Well-known Member
- Joined
- May 27, 2010
- Messages
- 529
I have some routines that I call with a variable in example1. The need has come to pass an array to the variable called subroutine; any ideas?
Code:
Sub CommandExamples()
Dim SomeArray As Variant
ReDim SomeArray(0 To 0)
'Example1: Example1 works; don't need any help with example 1
Application.Run "Example1"
'Example2: Example2 doesn't work; wondering how to run a routine that requires object sources (variant, long)
Application.Run "Example2(" & SomeArray & ")"
End Sub
Sub Example1()
Debug.Print "works"
End Sub
Sub Example2(ArraySource As Variant)
Debug.Print "does not work"
End Sub