ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Close Macro (https://www.excelbanter.com/excel-programming/297362-close-macro.html)

ronbo

Close Macro
 
Is there a way to create a macro so that if one clicks
on "tools" it will close the spreadsheet? Or is there a
way to remove toolbar functions?

Thanks

Ron de Bruin

Close Macro
 
You can disable a menu bar item

Sub a()
'disable menubar option
Application.CommandBars(1).FindControl(, 30007).Enabled = False
End Sub

Sub b()
Application.CommandBars(1).FindControl(, 30007).Enabled = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ronbo" wrote in message ...
Is there a way to create a macro so that if one clicks
on "tools" it will close the spreadsheet? Or is there a
way to remove toolbar functions?

Thanks





All times are GMT +1. The time now is 11:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com