ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I launch my macro by button? (https://www.excelbanter.com/excel-programming/343733-how-do-i-launch-my-macro-button.html)

Steven

How do I launch my macro by button?
 
Hi, there.

I have a macro runs on my excel file.
Only way I know to run this macro is pressing F5 in VB editor.

Now I want to create some type of userform has a button to activate my
macro.

Would you explain how to do this if you have a chance?

Thank you for taking time to read this..


Bob Phillips[_6_]

How do I launch my macro by button?
 
Make sure that the Forms toolbar is visible (ToolsCustomize and check
Forms).
Drag the button from this toolbar onto the worksheet
It will then prompt to assign a macro, select yours

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steven" wrote in message
oups.com...
Hi, there.

I have a macro runs on my excel file.
Only way I know to run this macro is pressing F5 in VB editor.

Now I want to create some type of userform has a button to activate my
macro.

Would you explain how to do this if you have a chance?

Thank you for taking time to read this..





All times are GMT +1. The time now is 01:45 AM.

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