Buttons on top of other

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello Experts
I have this excel sheet which has 2 macro buttons one below the other namely Button1 and Button2. I want to place the buttons one on top of other with the help of a code. When I press Button1 automatically Button2 must be on the top and vice versa. If the user presses the Button1 before Button2 then the code generates an error. To avoid this I want to try the above way.
 
All you have to do what I suggested and see what happens. I don't know if you want to have a result of toggling codes.
Click on the button and one macro is activated while the text on the button changes to what the next macro will do.
Click again and the next macro will run while it changes the text again for the first macro.

BTW, you don't need to quote whole posts. most of us know what we suggested. All it does is create extra clutter.
I tried but couldn't get the desired result. For the time being, decided to go with 2 buttons. I have created a message box code in the first button saying reminding to press the second button before running the first button.
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
What is "desired result"?
I mean expected result. Place the buttons on top of one another and when I press the button, the button on the top should go below and so on...
 

Attachments

  • Buttons.png
    Buttons.png
    2.1 KB · Views: 4
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Hide / Unhide Buttons with the help of a code - OzGrid Free Excel/VBA Help Forum
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Hide / Unhide Buttons with the help of a code - OzGrid Free Excel/VBA Help Forum
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Ok. Fluff. In future, I will provide details if shared on other platforms.
 
Upvote 0

Forum statistics

Threads
1,215,420
Messages
6,124,802
Members
449,190
Latest member
cindykay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top