Solved

add a password to open excel after 60 days

Posted on 2016-10-19
8
44 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 30

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 24

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 30

Accepted Solution

by:
Scott C earned 500 total points
ID: 41850123
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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 30

Expert Comment

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

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 30

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

739 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