How do you call one Sub from another Sub ?

L

lothario

Hi,

I have some VBA code attached to a button in sheet3.
I would like to use the exact same code in 6 other sheets.
How do I call this Sub in sheet3 from the other sheets?

Thanks,
Luther
 
R

Ron de Bruin

One way is to place the code in a macro and place the macro in
a normal module

Usethe macro name in the click event of the button like this

Private Sub CommandButton1_Click()
subname
End Sub
 

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

Top