Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updating Links
I have a consolidation file that has linked formulas from two other files (a
and b). Files a and b are password protected ( passwords are "one' and "two", respectively), so when I open only the consolidation file and attempt to update links, I have to key in the passwords. What I would like is a macro assigned to a button that when clicked, would automatically open the files, update the links, and then close the files. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updating Links
You can see the syntax in VBA's help:
expression.Open(FileName, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad, OpenConflictDocument) 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.) hurlbut777 wrote: I have a consolidation file that has linked formulas from two other files (a and b). Files a and b are password protected ( passwords are "one' and "two", respectively), so when I open only the consolidation file and attempt to update links, I have to key in the passwords. What I would like is a macro assigned to a button that when clicked, would automatically open the files, update the links, and then close the files. Thanks. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Updating links | Excel Discussion (Misc queries) | |||
Links not Updating | Links and Linking in Excel | |||
updating links | Excel Discussion (Misc queries) | |||
Updating links | Excel Worksheet Functions | |||
Updating links with VBA | Excel Programming |