Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way, given a file's path & name, to determine if it is a password
protected Excel workbook? And, if it is a password protected workbook, can I open it from VBA using that password, so I can modify it and save it from VBA? Thanks, Ken |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub OpenProtectedFile()
Dim wb As Workbook Dim ws As Worksheet Set wb = Workbooks.Open("C:\Password Protected File.xls", , , , "password1", "password2") Set ws = wb.Sheets("Sheet1") ws.Activate ws.Cells(1, 1).Value = "Modified by VBA" End Sub "Ken Loomis" schreef in bericht ... Is there a way, given a file's path & name, to determine if it is a password protected Excel workbook? And, if it is a password protected workbook, can I open it from VBA using that password, so I can modify it and save it from VBA? Thanks, Ken |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I set up the openning type of file | Excel Discussion (Misc queries) | |||
Openning spesific file in Excel | Excel Discussion (Misc queries) | |||
how to turn off highlighted cells when openning an excell file | Excel Discussion (Misc queries) | |||
Openning an .csv file | Excel Discussion (Misc queries) | |||
Getting dw20.exe error while openning excel formatted xml file | Excel Programming |