Hide Macro Button

Brutium

Board Regular
Joined
Mar 27, 2009
Messages
188
Hello ALL,

I have searched all over the various threads but I did not find anything that resembles my issue.

I have created a Workbook that uses a macro to create additional worksheets. The macro is activated by a button. What I would like to do is make sure that the user will not be able to click on the button once the sheets are created. Is there a way to either hide the button or disable the same button.

Any help would be greatly appreciated.

Thank you
Brutium
 
Sorry I did not explain myself well....

What is going to happen is that the user will click on the button in order to create the sheets, then what I would like is to hide the button so that the user will not be able to click on the same button once again.

Brutium
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
If you hide the button by putting the code I recommended inside the macro that creates the sheets, surely that will do exactly what you want?
 
Upvote 0
From the "Tools" menu, select the "Macro" entry, then the "Visual Basic Editor". Once the editor is up, the button's name should be displayed in the "Name Box" below the "File" menu when selected.
 
Upvote 0
Hello GlennUK,

No it comes back with an error. By hovering on the highlighted line which contains the error, it tells me that is lookig for Button1. I am not sure what my button is called. I tried to create another button, and the name for the second button is Button_2.Click().

Is there a way I can find out what my button is named?

Brutium
 
Upvote 0
Show the beginning of your macro that you have assigned to the button, where you should be hiding the button ( before you activate to some other sheet in the code ).
 
Upvote 0
Thank you all of you.

Your help is always welcome and highly appreciated!!:):):)

I was able to solve the problem. The reason why I was not able to have the button disappear was due to the naming of the button. I had a button name called "Button 1" instead of "Button1" , so once I changed the name of the button, I was OK, and everything works fine now.

Once again

THANK YOU!!!!

Brutium
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,937
Members
449,094
Latest member
teemeren

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