Help: Joining Two subroutines

  • Thread starter Thread starter kankely
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top