ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   password to access a custom menu? (https://www.excelbanter.com/excel-programming/407980-password-access-custom-menu.html)

michael.beckinsale

password to access a custom menu?
 
Hi All,

I need to provide a custom menu for 'administrators' of a spreadsheet.
This menu will give them priveleges not available to normal users and
therefore l would like to have them enter a password whenever they
click on the custom menu (eg ADMIN). I want to avoid having to check
for the correct password on each macro as there are too many.

The custom menu has been added using:

Dim ADMINmenu As CommandBarControl
Set ADMINmenu = Application.CommandBars("Worksheet Menu
Bar").Controls.add(Type:=msoControlPopup, Befo=8)
ADMINmenu.Caption = "&ADMIN"
ADMINmenu.BeginGroup = False
ADMINmenu.Visible = True

Can anybody give me any pointers / code to achieve this please?

Regards

Michael

michael.beckinsale

password to access a custom menu?
 

Hi All,

Must be getting tired, adding this line to launch macro solved the
problem

ADMINmenu.OnAction = "password_request"

Regards

Michael


All times are GMT +1. The time now is 05:39 PM.

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