You can't really do "pass backward" as such, but there are two alternative
methods you can use. The first is to make the called procedure a Function
not a Sub. A Function procedure can return a value to its caller. E.g.,
Sub Calling()
Dim Result As Long
Result = Called()
Debug.Print Result
End Sub
Function Called() As Long
' some code
Called = 1234
End Sub
The second method is to pass ByRef an argument to the Called procedure and
have the Called procedure set that value.
Sub Calling()
Dim L As Long
Called L
Debug.Print L
End Sub
Sub Called(ByRef LL As Long)
' some code
LL = 1234
End Sub
Because the parameter LL is declared ByRef the variable L in the Calling
procedure gets the value 1234. ByRef is the default method of passing
parameters so you don't necessarily need the ByRef keyword, but I usually
include it to emphasize that the parameter is going to be set by the called
procedure. The name of the parameter (LL in the example) need not have the
same name as the variable in the Calling procedure (L in the example).
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)