external link confirm dialog box...


Posted by rm on January 02, 2002 4:04 PM

hello,

does anyone know vba code to always accept (same as pressing "yes") to dialog box asking to update external links referenced in sheet. I would like the workbook I am preparing to involve as little user intervention as necessary...thank you...rm

Posted by Rosencrantz on January 02, 2002 4:52 PM


If you want links to be updated automatically (i.e. the dialog box does not appear), go to tools>options>edit and de-select "ask to update automatic links".

If you want links to be updated when the workbook is opened (even if the dialog box appears and user selects "No"), put this in the workbook module :-

Private Sub Workbook_Open()
ThisWorkbook.UpdateLink _ Name:=ThisWorkbook.LinkSources
End Sub


Posted by rm on January 02, 2002 5:27 PM

thanks Rosencrantz for the goods...it's too bad that vba can't do this and it has to be done manually, because this workbook will always be "yes" to updating links (but may not be so with other workbooks opened)...so I wanted to make it easier for user...but I guess one little button click won't be so bad...rm




Posted by Rosencrantz on January 03, 2002 6:33 AM

Maybe it can be done, but if it can I don't know how. Perhaps you should post again. Sorry I can't help further.