route217
asked on
Lunch user form from macro button
Hi Experts
I have the following code in Thisworkbook
Private Sub Workbook_Open ()
Worksheets("MO - Data").Activate
Userform1.show
End Sub
So the user form open on opening the WBk - I want to change so the user form operates from a macro button...and not when the workbook opens...
I have the following code in Thisworkbook
Private Sub Workbook_Open ()
Worksheets("MO - Data").Activate
Userform1.show
End Sub
So the user form open on opening the WBk - I want to change so the user form operates from a macro button...and not when the workbook opens...
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
In have requested attention on other question...
route217,
(1) Insert a new module.
(2) Move the  Workbook_Open macro to the new module - dropping the "Private" and renaming it to, say, "MyMacro".
(3) In the appropriate sheet, click on "Developer" in the Ribbon's menu bar. (If it's not visible I'll explain how to display it.)
(4) Click on "Insert".
(5) In the "Forms Control" section, click on the first icon ("Button").
(6) Draw your button on the sheet.
(7) If the "Assign Macro" dialogue is not displayed then right click on the button and click on "Assign Macro...".
(8) Select your macro and click on OK.
(9) Click on a cell.
(Thanks for sorting out the other question.)
Regards,
Brian.
(1) Insert a new module.
(2) Move the  Workbook_Open macro to the new module - dropping the "Private" and renaming it to, say, "MyMacro".
(3) In the appropriate sheet, click on "Developer" in the Ribbon's menu bar. (If it's not visible I'll explain how to display it.)
(4) Click on "Insert".
(5) In the "Forms Control" section, click on the first icon ("Button").
(6) Draw your button on the sheet.
(7) If the "Assign Macro" dialogue is not displayed then right click on the button and click on "Assign Macro...".
(8) Select your macro and click on OK.
(9) Click on a cell.
(Thanks for sorting out the other question.)
Regards,
Brian.
ASKER
Thanks and no problem ....
New question coming up
New question coming up
ASKER
Quick question how do I find out what userfirm it is as userfirm one - is not correct as I have inserted another user form..
Thanks, route217.
ASKER
Thanks brain
I have post a new question which is 90% similar to the excellent piece of work you created ...
See link...https://www.experts-exchange.com/questions/28027470/Macro-to-combine-data-of-selected-worksheet-same-workbook.html
I have post a new question which is 90% similar to the excellent piece of work you created ...
See link...https://www.experts-exchange.com/questions/28027470/Macro-to-combine-data-of-selected-worksheet-same-workbook.html
ASKER
Can you kindly paste the code here and where to put it... As I cannot access the experts exchange website from my current location - using iPhone...