View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Miller Dave Miller is offline
external usenet poster
 
Posts: 72
Default vba code for opening password protected workbook

Sub OpenPassword()
Dim wbk As Workbook

Application.DisplayAlerts = False

Set wbk = Workbooks.Open(Filename:="", _
UpdateLinks:=True, _
Password:="")

With wbk
.Save
.Close
End With

Set wbk = Nothing
End Sub