Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible for somebody to tell me the code i would need to open up a
password protected workbook, update the linked worksheets inside, then save and close. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is a example for all workbooks in a folder
http://www.rondebruin.nl/copy4.htm You can see the code that you must use on that page If you need more help post back -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Carl Irving" wrote in message ... Is it possible for somebody to tell me the code i would need to open up a password protected workbook, update the linked worksheets inside, then save and close. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks guys thats brilliant, unfortunately it used to ask me for 2 passwords
and it still tells me to enter a password for write access or open as read only, is there a way to bypass this password too? "Dave Miller" wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See the example on my page
Set mybook = Workbooks.Open(MyPath & MyFiles(Fnum), _ Password:="ron", WriteResPassword:="ron", UpdateLinks:=0) -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Carl Irving" wrote in message ... Thanks guys thats brilliant, unfortunately it used to ask me for 2 passwords and it still tells me to enter a password for write access or open as read only, is there a way to bypass this password too? "Dave Miller" wrote: 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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Ron, Sorry to be a pain but i cant get this to work, im obviously doing something wrong, do i just need those 2 lines you gave me or is there something else i need to insert, both my files are in the same folder as suggested. "Ron de Bruin" wrote: See the example on my page Set mybook = Workbooks.Open(MyPath & MyFiles(Fnum), _ Password:="ron", WriteResPassword:="ron", UpdateLinks:=0) -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Carl Irving" wrote in message ... Thanks guys thats brilliant, unfortunately it used to ask me for 2 passwords and it still tells me to enter a password for write access or open as read only, is there a way to bypass this password too? "Dave Miller" wrote: 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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Dave's code you see
Password:="ron" Now add this WriteResPassword:="ron", -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Carl Irving" wrote in message ... Hi Ron, Sorry to be a pain but i cant get this to work, im obviously doing something wrong, do i just need those 2 lines you gave me or is there something else i need to insert, both my files are in the same folder as suggested. "Ron de Bruin" wrote: See the example on my page Set mybook = Workbooks.Open(MyPath & MyFiles(Fnum), _ Password:="ron", WriteResPassword:="ron", UpdateLinks:=0) -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Carl Irving" wrote in message ... Thanks guys thats brilliant, unfortunately it used to ask me for 2 passwords and it still tells me to enter a password for write access or open as read only, is there a way to bypass this password too? "Dave Miller" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening a password-protected spreadsheet from a website link | Excel Discussion (Misc queries) | |||
password protected page not opening by web query | Excel Worksheet Functions | |||
Opening password protected files | Excel Programming | |||
Excel password protected not opening up on just one PC. | Excel Discussion (Misc queries) | |||
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. | Excel Worksheet Functions |