how to hide buttons that are added in another macro

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
655
Hello

So I have a macro that adds a sheet, formats it, adds the formula, and adds buttons (calling other macros). There are 7 buttons made for each sheet made- so I'd like to know how to hide two of the buttons when the sheet is first made (I presume for the button itself, when it's made I just specify it as visible = False) but it seems the buttons aren't always numbered the same on each sheet made- I'd like one of the other buttons to be used to unhide the two hidden buttons, if that makes sense. Not sure how to unhide the buttons if the numbers are always changing (like button19 for a hidden button on one page might be button 7 on the next page).

Thanks!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
So I’m not sure why the button numbers were changing each time I added a sheet but I seemed to have solved it. I added a .visible = false and then put a button in to show and everything SEEMS to be working....for now.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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