I can use the following to reset the worksheet menu bar.
However, sometimes I just want to delete a specific button.
The problem is, sometimes the Button is not on the menu bar, therefore I need to check first before deleting it.
I can not use reset as there are other buttons that I do not want deleted.
I have tried on error resume next, however it does not work if the button is not on the toolbar, it bugs out.
Does anyone know of an if statement etc... to check if the button is available.
Thanks
Code:
Application.CommandBars("Worksheet Menu Bar").Reset
However, sometimes I just want to delete a specific button.
Code:
Application.CommandBars("Worksheet Menu Bar").Controls("Access Scripts").Delete
The problem is, sometimes the Button is not on the menu bar, therefore I need to check first before deleting it.
I can not use reset as there are other buttons that I do not want deleted.
I have tried on error resume next, however it does not work if the button is not on the toolbar, it bugs out.
Does anyone know of an if statement etc... to check if the button is available.
Thanks