update links to password protected workbooks.

Tech-Archive recommends: Fix windows errors by optimizing your registry



Dear all, I think from my research here and on other sites that i am trying
the impossible but I would like this confirmed or a solution please!

I have a user that has 30 workbooks each of which are password protected with
unique passwords, please note it is workbook not work*** passords.

There is a summary workbook with links to cells in each of the 30 workbooks.
The user wants a command button theat will enable all links to be updated.
the problem is that when trying this the user is asked for the password.
Please see code I have so far:

Public Sub updateWBLinks()
Dim oWB As Workbook
thisbk = ActiveWorkbook.Name ' this is the summaray ***.
dbfilepath = "I:\Social Services\HQ\Performance Management\Richard Henderson\
Hayling Island master v1.xls" ' this is the file to get data from -
password protected.
Application.DisplayAlerts = False
Set oWB = Workbooks.Open(Filename:=dbfilepath, UpdateLinks:=3, Password:
="se112", writerespassword:="se112")
MsgBox ActiveWorkbook.Name
Workbooks(thisbk).Activate
Workbooks(thisbk).UpdateLink Name:=ActiveWorkbook.LinkSources ' this causes
the password dialogue box to be displayed.
oWB.Close

For now I am only working with the one workbook am ok with a routine to open
all 30.

any ideas??


Many thanks
End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/ms-excel/200905/1

.


Quantcast