ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to assing micro to a command button (https://www.excelbanter.com/excel-discussion-misc-queries/138284-how-assing-micro-command-button.html)

Qazi Ahmad

How to assing micro to a command button
 
How I assign a micro to a command button?
And How i assign 5 micros to a one command button?

FSt1

How to assing micro to a command button
 
hi,
right click the button. from the popup menu, select "view code". the default
should be the click event. If you have already written the macro, then you
can use the call command to call it from the button code. if not, then you
can put your macro directly into the button code. if running 5 macros, i
would write them seperate and use the call command
private Sub Commandbutton1_Click()

Call macro1
Call macro2
Call macro3
Call macro4
Call macro5

End Sub

used this way, each macro will run in turn, one after the other so be sure
to get your sequences in order.

Regards
FSt1

"Qazi Ahmad" wrote:

How I assign a micro to a command button?
And How i assign 5 micros to a one command button?



All times are GMT +1. The time now is 08:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com