Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code that ask user for a password before it runs..
Hi,
I'm using this code below to delete some unused worksheets in the active workbook. I only want certain users to be able to use this feature.. so.. Is there a way to add code to this code below...that would ask the user for a password....maybe in a userform ...and then if they type in the correct password, the code below runs..and if they type in an incorrect password..this code does not run. Sub DeleteBlankSheets() Dim sht As Worksheet For Each sht In ActiveWorkbook.Worksheets If sht.Range("A3") = "Delete" Then Application.DisplayAlerts = False sht.Delete Application.DisplayAlerts = True End If Next End Sub Any help is greatly appreciated!! Thanks in advance, Kimberly |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cerfiticate Issues When User runs my Macro | Excel Discussion (Misc queries) | |||
Password visible if user selects "view code" | Excel Worksheet Functions | |||
User to decide how often a macro runs | Excel Discussion (Misc queries) | |||
Links in formulas change when another user runs a workbook | Excel Discussion (Misc queries) | |||
Show progress in a user form while code runs | Excel Programming |