how to automate opening a password protected excel file? e.g. a .xls that has a password set in the

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

how to automate opening a password protected excel file? e.g. a .xls that
has a password set in the security tab.
 
With no checking...

Option Explicit
Sub testme()
Dim Wkbk As Workbook
Set Wkbk = Workbooks.Open(Filename:="C:\My Documents\excel\book1.xls", _
Password:="hithere")
End Sub

The code has to "know" the password.
 
Back
Top