Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,075
- Office Version
- 2019
- Platform
- Windows
Is it possible to create a password for a user to have permanent, unrestricted access and not not be prompted for a password again?
I must of missed that
No argument intended or implied
Still minor modification of Open Event will help the OP I personally don't know how to modify code through VB but the Open Event offers options
Kr
Dave
Dave Hmmmm..did I miss something? Whats is OP?
I have an idea on how to do this, but I have to check to see if it is OK to post what I have in mind.
Sub Register()
Dim x
x = InputBox("Enter Password to Unlock")
If x = "password" Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs ThisWorkbook.FullName, Password:=""
Application.DisplayAlerts = True
End If
End Sub
Leave your password as it is, and put a macro in your workbook called, as below. It can be changed to save out the file as something else, but if the correct password is entered, it will resave the workbook over itself without a password. Be sure and lock your VBA code:
Code:Sub Register() Dim x x = InputBox("Enter Password to Unlock") If x = "password" Then Application.DisplayAlerts = False ThisWorkbook.SaveAs ThisWorkbook.FullName, Password:="" Application.DisplayAlerts = True End If End Sub
However keep in mind that changing the password anyway is easy once you have the password to get in the file in the first place.
However keep in mind that changing the password anyway is easy once you have the password to get in the file in the first place.