Automatically Update Workbook Links as part of AutoOpen Macro?

  • Thread starter Thread starter dim
  • Start date Start date
D

dim

Hi folks,

Hope everyone is keeping well. :-)

I'm looking to incorporate code into my auto-open macro so that the error
message shown here does not appear


I want the 'Update' option to be automatically selected when the workbook
opens.

Does anyone know how I can do this?

Thanks, and have a Merry Christmas! :-)
 
You could open the workbook from another workbook using the
Open method with the UpdateLinks argument set to 3...
'--
Workbooks.Open "MySpecialWorkbook.xls",UpdateLinks:=3
ActiveWorkbook.RunAutoMacros xlAutoOpen
'--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
("rows to repeat at bottom" now available)



"dim"
wrote in message
Hi folks,
Hope everyone is keeping well. :-)
I'm looking to incorporate code into my auto-open macro so that the error
message shown here does not appear:


I want the 'Update' option to be automatically selected when the workbook
opens.
Does anyone know how I can do this?
Thanks, and have a Merry Christmas! :-)
 
Hi again!

This is more of a question for general curiosity and learning purposes...

....with the code you gave me, what would be the other numerical values in
UpdateLinks as opposed to 3, and what does each of them do?

Thankyou very much again for any responses.
 
Just look in the Excel VBA help file for "Open Method"...

0 Doesn't update any references
1 Updates external references but not remote references
2 Updates remote references but not external references
3 Updates both remote and external references
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(11 add-ins for direct download - includes sort by color)




"dim"
wrote in message
Hi again!
This is more of a question for general curiosity and learning purposes...
....with the code you gave me, what would be the other numerical values in
UpdateLinks as opposed to 3, and what does each of them do?
Thankyou very much again for any responses.
 
Back
Top