ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   bypass password when update linking of password protected file (https://www.excelbanter.com/excel-discussion-misc-queries/11902-bypass-password-when-update-linking-password-protected-file.html)

Yan

bypass password when update linking of password protected file
 
Hi,

I am the administrator of all the password protected file, and I am linking
them to one individual summary file, when I open the file, and I want to
update the link to reflect the most current data, how can I bypass all the
password, so I don't have to type in the password for all the source file?

Dave Peterson

Maybe you could create a macro that would open all those workbooks first.

Your macro would supply both the workbook's name and password.

Then after all these workbooks are open, you could open the file that contains
the links.

Kind of like:

option explict
sub auto_open()
dim wkbk1 as workbook
dim wkbk2 as workbook
dim wkbk3 as workbook

set wkbk1 = workbooks.open(filename:="c:\a.xls",password:="one ")
set wkbk2 = workbooks.open(filename:="c:\b.xls",password:="two ")
set wkbk3 = workbooks.open(filename:="c:\c.xls",password:="thr ee")

'wkbk3 is the real one!

wkbk1.close savechanges:=false
wkbk2.close savechanges:=false
'thisworkbook.close savechanges:=false
end sub

(I'd create a 4th workbook that opens the files in order and just closes the
first 2 and then itself.)

Yan wrote:

Hi,

I am the administrator of all the password protected file, and I am linking
them to one individual summary file, when I open the file, and I want to
update the link to reflect the most current data, how can I bypass all the
password, so I don't have to type in the password for all the source file?


--

Dave Peterson


All times are GMT +1. The time now is 08:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com