Shortcut that passes a password

  • Thread starter Thread starter M.Siler
  • Start date Start date
M

M.Siler

I have a spreadsheet that is on our network and I keep it password protected
to keep the general staff out, but it's not overly sensitivity. Is there a
way that I can put a shortcut on my system what will pass in the password so
when I'm on my computer I don't have to enter the password everytime? I'm
using Excel 2007.

Thanks,
Mark
 
You could create another workbook that opens your real workbook and then closes
itself. The put a shortcut to that helper workbook on your desktop.

That first workbook could have the password built into it.

Option Explicit
Sub auto_open()

Dim myPWD As String
Dim wkbk As Workbook
myPWD = "hi"
Set wkbk = Workbooks.Open(Filename:="C:\my documents\excel\book1.xls", _
Password:=myPWD)

wkbk.RunAutoMacros which:=xlAutoOpen

'ThisWorkbook.Close savechanges:=False

End Sub

When you're done testing, uncomment that last line. It closes the helper
workbook without saving--could be a pain while you're testing.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Excel macro and passwords 3
IMAP 1
IMAP 0
Problem In Opening Excel: Thoughts On ? 2
Are password protected WiFi networks secure? 3
Excel Protection 2
remove password 2
Forgot password for Excel 2007 spreadsheet (*.xls) 3

Back
Top