If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
=> VB Command button to Execute Excel Macro
Hello,
I am attempting to execute an Excel Macro using the on_click event of a VB button. I have not as yet had much success. I am able to get as far as drawing the VB button on the Excel spreadsheet in design mode, however on execution the Macro1 is not recognised. Any suggestions would be very much appreciated. Thank you kindly Rhonda |
#2
|
|||
|
|||
=> VB Command button to Execute Excel Macro
Rhonda,
By virtue of you mentioning design mode, I assume you mean control buttons, not forms. After drawing the button, whilst still in design mode, double-click the button, and you will be taken to the worksheet code module, with a skeleton event code macro for that button already created Private Sub CommandButton1_Click() End Sub Just add your code, or a call to you macro, in that event macro. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rhonda Fischer" wrote in message ... Hello, I am attempting to execute an Excel Macro using the on_click event of a VB button. I have not as yet had much success. I am able to get as far as drawing the VB button on the Excel spreadsheet in design mode, however on execution the Macro1 is not recognised. Any suggestions would be very much appreciated. Thank you kindly Rhonda |
Thread Tools | |
Display Modes | |
|
|