Hi,
I am having trouble dealing with multiple arguments when they are passed from one cell to the next.
I have the following public sub:
Which I pass to the following:
But I get the following error
Compile Error:
Argument not optional
What is going wrong?
P.S. I am still a bit unclear on the public vs. private sub/ ByRef demarcation.
I am having trouble dealing with multiple arguments when they are passed from one cell to the next.
I have the following public sub:
Code:
Public Sub testFunctOne()
Dim arg1, arg3 as Long, arg2, arg4 as Variant, arg5 as String
arg1 = 10
arg2(1) = True
arg2(2) = False
arg3 = 10
arg4 (1)= 1
arg4(2) = 2
arg5 = "String"
FunctOne arg1, arg2, arg3, arg4, arg 5
End Sub
Code:
Public Sub FunctOne(ByRef arg1 as long, ByRef arg2 as variant, ByRef arg3 as long, ByRef arg4 as variant, ByRef arg5 as String
Dim something as Integer
Something = 0
End Sub
Compile Error:
Argument not optional
What is going wrong?
P.S. I am still a bit unclear on the public vs. private sub/ ByRef demarcation.