run macro on a CommandButton from another sheet

C

Corey

I am trying to get a macro linked to a commandbutton to run, from another code in another sheet, but
casnnot get the code right.

Tried:

Sheet2.CommandButton2.Select etc to no avail

What is the line of code to run it ?

Corey....
 
C

Corey

Nevermind, just worked it out as i placed the post.
Removed the Private from the Commandbutton2 _Click Sub and when i typed in Sheet2.
The Commandbutton2_Click was then listed.
Yay!

Corey....
I am trying to get a macro linked to a commandbutton to run, from another code in another sheet, but
casnnot get the code right.

Tried:

Sheet2.CommandButton2.Select etc to no avail

What is the line of code to run it ?

Corey....
 

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