Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

add a password to open excel after 60 days

Posted on 2016-10-19
8
Medium Priority
?
61 Views
Last Modified: 2016-10-19
I have an excel document that I want to require a password to open after 30 days.
I don't want to kill or delete the document, just require a password.
0
Comment
Question by:drelinger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 32

Expert Comment

by:Scott C
ID: 41850114
So you don't want the document to be able to be opened UNTIL 30/60 days have passed and then only with a password?

Possibly with the workbook open event...

Private Sub Workbook_Open()
If Now > 42298 Then
    ThisWorkbook.Protect Password:="SpongeBob"
End If
End Sub
0
 
LVL 25

Expert Comment

by:Brian B
ID: 41850115
So no password until 30 days after creation?

You would have to have the date the workbook was made written in the sheet somewhere. A macro that runs when the file is opened could then check if the current date is 30 days after the creation date, set a password and force the file closed. However that solution has some downsides, such as requiring that somebody try to open the file before the passwords get set.

The most secure way would be if you could password protect the files without opening them. But I don't think that would be an Excel solution, it would have to happen at the windows level.
0
 
LVL 32

Accepted Solution

by:
Scott C earned 2000 total points
ID: 41850123
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:drelinger
ID: 41850124
To clarify.  I would set the expiration date in code.
I'd like a password added to the file on a particular date.
0
 

Author Closing Comment

by:drelinger
ID: 41850127
wow, that's perfect.. and small code...
Thanks much.
Mark
0
 
LVL 32

Expert Comment

by:Scott C
ID: 41850135
Glad I could help.
0
 
LVL 22

Expert Comment

by:Roy Cox
ID: 41850582
Are links to other Forums allowed, I was told not! Apparently I am not even allowed to link to my own site.
0
 
LVL 32

Expert Comment

by:Scott C
ID: 41850627
I've never had a problem before.  I simply referenced what I found to not run into copyright issues.
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question