Private Type fReturns ' Put this in a module or on form
Value1 As Long
Value2 As Long
End Type
Private Sub txtVarType_Click() ' Call the function
Dim Temp As fReturns
Dim T As Long
Temp = fTest()
T = Temp.Value1
T = Temp.Value2
End Sub
Private Function fTest() As fReturns
fTest.Value1 = 6
fTest.Value2 = 9
End Function