Hi
I have spent a big part of the day fighting a losing battle, but have a work around. What I need to do is update links in several different files which are password protected to open and modify.
The file will be used by different people so getting them to input the password's is not a option.
I have put some simple code together which opens the protected workbook then reapplies the links for the file and closes the workbook which works but is a lot slower than before the passwords was used.
Is there a smarter way of doing this?
Any feedback greatly appreciated
I have spent a big part of the day fighting a losing battle, but have a work around. What I need to do is update links in several different files which are password protected to open and modify.
The file will be used by different people so getting them to input the password's is not a option.
I have put some simple code together which opens the protected workbook then reapplies the links for the file and closes the workbook which works but is a lot slower than before the passwords was used.
Is there a smarter way of doing this?
Code:
Sub OpenUpdate()
Dim TestFile As String
TestFile = "C:\TestPWord.xlsm"
Workbooks.Open Filename:=TestFile, _
Password:="Luck", ReadOnly:=True
ThisWorkbook.ChangeLink Name:=TestFile, NewName:= _
TestFile, Type:=xlExcelLinks
Workbooks("TestPword.xlsm").Close savechanges:=False
End Sub
Any feedback greatly appreciated