Solved

add a password to open excel after 60 days

Posted on 2016-10-19
8
50 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 31

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 31

Accepted Solution

by:
Scott C earned 500 total points
ID: 41850123
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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 31

Expert Comment

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

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 31

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
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.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

724 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