F
flying_pig
Although I have a basic understanding of inter-marco parameter passing I seem
to be doing something wrong (see code extract below). It will work sending
strings in quotes but does not accept String variables.
The called macro:
Sub Recieve(TextA,TextB,TextC as String,ValueA,ValueB,ValueC as integer)
MSGBOX(TextA) 'test to show they arrive (others not shown here)
..
..
..
..
End Sub
The calling Macro:
Sub SendTextandValues()
Dim MyTextA, MyTextB, MyTextC as String
Dim MyValue1, MyValue2, MyValue3 as Integer
MyTextA="Text_A"
MyTextB="Text_B"
MyTextC="Text_C"
MyValue1= 1
MyValue2= 2
MyValue3= 3
'using call
Call Recieve(TextA,TextB,TextC,ValueA,ValueB,ValueC)
..
..
'not using call doesn't work either as here:
' Recieve TextA,TextB,TextC,ValueA,ValueB,ValueC
..
..
..
End Sub
Any suggestions please?
to be doing something wrong (see code extract below). It will work sending
strings in quotes but does not accept String variables.
The called macro:
Sub Recieve(TextA,TextB,TextC as String,ValueA,ValueB,ValueC as integer)
MSGBOX(TextA) 'test to show they arrive (others not shown here)
..
..
..
..
End Sub
The calling Macro:
Sub SendTextandValues()
Dim MyTextA, MyTextB, MyTextC as String
Dim MyValue1, MyValue2, MyValue3 as Integer
MyTextA="Text_A"
MyTextB="Text_B"
MyTextC="Text_C"
MyValue1= 1
MyValue2= 2
MyValue3= 3
'using call
Call Recieve(TextA,TextB,TextC,ValueA,ValueB,ValueC)
..
..
'not using call doesn't work either as here:
' Recieve TextA,TextB,TextC,ValueA,ValueB,ValueC
..
..
..
End Sub
Any suggestions please?