When you say "Without using a class..." then I am assuming that the proceedures are in a Module and not a class module or Form (A form is a class).
You could use a public variable in the module - not always the best idea unless the variable is tobe used through-out the program). Or you could make sure that the variable is passed from proceedure to proceedure by reference (byRef):
Put the next line in the declarations section of a public module:
Public sTestPubVar As String
and then drop all of the following code at the bottom of the same module:
Sub TestSub()
Dim sTest As String
TestSub1 sTest
Debug.Print sTest
Debug.Print sTestPubVar
'in this example sTest should hold the value "HI" and sTestPubVar the
'string: "Public Variable Set In TestSub2"
End Sub
Sub TestSub1(ByRef sTestVar1 As String)
TestSub2 sTestVar1
End Sub
Sub TestSub2(ByRef sTestVar2 As String)
sTestVar2 = "HI"
sTestPubVar = "Public Variable Set In TestSub2"
End Sub'============================
'Function Test ====================
Sub TestFunc()
Dim sTest1 As String
Dim sTest2 As String
sTest2 = TestFunc1(sTest1)
Debug.Print sTest1
Debug.Print sTest2
Debug.Print sTestPubVar
'in this example sTest1 should hold the value "HI"
'and sTest2 should return "BYE"
'and sTestPubVar the string: sTestPubVar = "Public Variable Set In TestFunc2"
End Sub
Function TestFunc1(ByRef sTestVar1 As String) As String
TestFunc1 = TestFunc2(sTestVar1)
End Function
Function TestFunc2(ByRef sTestVar2 As String) As String
sTestVar2 = "HI"
TestFunc2 = "BYE"
sTestPubVar = "Public Variable Set In TestFunc2"
End Function
'============================
Now open the immediate window and call first the sub: "TestSub" and then the sub "TestFunc" (Enter the word TestSub or TestFunc and hit the Enter key)