assign action to custom button
Hi All,
I have created a button via customize - toolbars- new - added command button (rename from &button to &Report) I would like to know how to refer to this button in vba coding? I would like to code: when the button report is click, then load the userform Report_Graph. Private Sub Report_Click() Report_Graphs.Show vbModeless End Sub i think this code would be in the ThisWorkBook object. Private sub or is there a better way to do this? thanks for the help. still learning, tracktraining -- Learning |
assign action to custom button
hi
i think that maybe all you need to do is assign your macro to the custom button. to do so... right click any toolbar. with the customize dialog up, right click your buttom then from the popup select assign macro. from the assign macro dialog, scroll to and select your macro. ok on the assign macro dialog close on the customize dialog. should be done. Regards FSt1 "tracktraining" wrote: Hi All, I have created a button via customize - toolbars- new - added command button (rename from &button to &Report) I would like to know how to refer to this button in vba coding? I would like to code: when the button report is click, then load the userform Report_Graph. Private Sub Report_Click() Report_Graphs.Show vbModeless End Sub i think this code would be in the ThisWorkBook object. Private sub or is there a better way to do this? thanks for the help. still learning, tracktraining -- Learning |
assign action to custom button
thanks!
-- Learning "FSt1" wrote: hi i think that maybe all you need to do is assign your macro to the custom button. to do so... right click any toolbar. with the customize dialog up, right click your buttom then from the popup select assign macro. from the assign macro dialog, scroll to and select your macro. ok on the assign macro dialog close on the customize dialog. should be done. Regards FSt1 "tracktraining" wrote: Hi All, I have created a button via customize - toolbars- new - added command button (rename from &button to &Report) I would like to know how to refer to this button in vba coding? I would like to code: when the button report is click, then load the userform Report_Graph. Private Sub Report_Click() Report_Graphs.Show vbModeless End Sub i think this code would be in the ThisWorkBook object. Private sub or is there a better way to do this? thanks for the help. still learning, tracktraining -- Learning |
assign action to custom button
you're welcome
regards FSt1 "tracktraining" wrote: thanks! -- Learning "FSt1" wrote: hi i think that maybe all you need to do is assign your macro to the custom button. to do so... right click any toolbar. with the customize dialog up, right click your buttom then from the popup select assign macro. from the assign macro dialog, scroll to and select your macro. ok on the assign macro dialog close on the customize dialog. should be done. Regards FSt1 "tracktraining" wrote: Hi All, I have created a button via customize - toolbars- new - added command button (rename from &button to &Report) I would like to know how to refer to this button in vba coding? I would like to code: when the button report is click, then load the userform Report_Graph. Private Sub Report_Click() Report_Graphs.Show vbModeless End Sub i think this code would be in the ThisWorkBook object. Private sub or is there a better way to do this? thanks for the help. still learning, tracktraining -- Learning |
All times are GMT +1. The time now is 11:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com