Help: Joining Two subroutines

K

kankely

Pardon me this is my first week learning VBA . I have two excel
sub-routines each working independently , how can i link them so that i
can insert them to the same sheet module .



Sub A()

End If
End
Sub B()

End If
End Sub Sub
 
B

Bernie Deitrick

Not sure what you mean byu "Joining", but running C will run A, then B.
This is how the code should appear in your module:

Sub A()
MsgBox "Hi from A"
End Sub

Sub B()
MsgBox "Hi from B"
End Sub

Sub C()
A
B
MsgBox "Hi from C"
End Sub

HTH,
Bernie
MS Excel MVP
 
Top