Link to home
Start Free TrialLog in
Avatar of mlouie23
mlouie23

asked on

Macros set to a control button

What is the code for clicking on a control button in excel that runs a macro?
Avatar of vbWayne
vbWayne

Shell "C:\Program Files\Microsoft Office\Office\WINWORD.EXE /yourmacroname", 1
Avatar of mlouie23

ASKER

Edited text of question.
Hi vbWayne,
    Thanks for the help, but I'm sorry, I wasn't specific enough with my question.

     I've got a conrol button on one worksheet, and I want to run a macro within the same file on a different worksheet.  Does the line of code require to have "C:\Program Files\...etc?"
  Is there there a command/code more specific in excel?
 
not sure on that one..I only have bits of code I've collected here and there..the code I gave you opens excel, a file, and runs a macro.


ASKER CERTIFIED SOLUTION
Avatar of andyclap
andyclap
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
andyclap,

    Thanks so much for your knowledge!
It helped me a lot.

Take Care,

mlouie23