Create password for permenent access

Av8tordude

Well-known Member
Joined
Oct 13, 2007
Messages
1,075
Office Version
  1. 2019
Platform
  1. 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'm not trying to argue, I was just asking, considering this:

Originally Posted by HOTPEPPER
What password are you talking about?

Opening the file, modifying the file, unprotecting the sheet or what?

opening a workbook
 
Upvote 0
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
 
Upvote 0
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

Hmmmm..did I miss something? Whats is OP?
 
Upvote 0
I just realise the code is for opening worksheets. The worksheets are password protected to prevent user from mistaken erasing certain cells. What I asking was to create a password to a trial period workbook and at the end of the trial, the user enters a password for perment access. When the user has purchased the password, the have unrestricted access to the workbook and not be promted again for that password.

Any suggestions?
 
Upvote 0
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.
 
Last edited:
Upvote 0
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.
 
Upvote 0
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.


As I understand, do I put this code in "ThisWorkBook" under the code I already Have or do I incorporate this code into the Trial Code I have in the "Workbook Open ()" event?
 
Last edited:
Upvote 0
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.

I'm not sure what you mean, but What I have in mind is allowing the user 3 chances to enter the password, and if the user does not enter the password correctly on the third try, the workbook will be closed, and erase from the user hard drive.
 
Upvote 0

Forum statistics

Threads
1,226,859
Messages
6,193,396
Members
453,793
Latest member
MillionMonkeys

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top