A Allen Browne Oct 13, 2005 #2 Pass the variable to the other procedure. Example: Function AddEmUp(a as Long, b as long) As Long AddEmUp = a + b End Function Now pass the variables like this: Sub cmdGetAnswer_Click() Dim a as Long Dim b As Long Dim c As Long a = 4 b = 5 c = AddEmUp(a, b) End Sub
Pass the variable to the other procedure. Example: Function AddEmUp(a as Long, b as long) As Long AddEmUp = a + b End Function Now pass the variables like this: Sub cmdGetAnswer_Click() Dim a as Long Dim b As Long Dim c As Long a = 4 b = 5 c = AddEmUp(a, b) End Sub
G Guest Oct 13, 2005 #3 Thanks Allen..fantastic. Allen Browne said: Pass the variable to the other procedure. Example: Function AddEmUp(a as Long, b as long) As Long AddEmUp = a + b End Function Now pass the variables like this: Sub cmdGetAnswer_Click() Dim a as Long Dim b As Long Dim c As Long a = 4 b = 5 c = AddEmUp(a, b) End Sub Click to expand...
Thanks Allen..fantastic. Allen Browne said: Pass the variable to the other procedure. Example: Function AddEmUp(a as Long, b as long) As Long AddEmUp = a + b End Function Now pass the variables like this: Sub cmdGetAnswer_Click() Dim a as Long Dim b As Long Dim c As Long a = 4 b = 5 c = AddEmUp(a, b) End Sub Click to expand...