A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

External References



 
 
Thread Tools Display Modes
  #1  
Old November 10th, 2003, 09:49 AM
Pinda
external usenet poster
 
Posts: n/a
Default External References

When one has external references in a workbook, a dialogue
box pops up on opening the workbook saying...


"The workbook you opened contains automatic links to
information to another workbook. Do you want to update
this workbook with changes made to the other
workbook.......

Yes or No."

Is it possible to use VBA to always choose yes on opening
the spreadsheet so that the dialogue box doesn't appear?

Thanks in advance.

Pinda
  #2  
Old November 10th, 2003, 07:55 PM
Harlan Grove
external usenet poster
 
Posts: n/a
Default External References

"Pinda" wrote...
When one has external references in a workbook, a dialogue
box pops up on opening the workbook saying...

...
Is it possible to use VBA to always choose yes on opening
the spreadsheet so that the dialogue box doesn't appear?


Easier than that. *IF* the links are automatic (most external reference links in
formulas are), you can turn off an option that causes this particular dialog to
appear. Tools Options, Edit tab, uncheck 'Ask to update automatic links',
click OK.

Warning: changing this option bypasses this dialog ALL THE TIME, so if some of
your users have other, large workbooks with lots of external reference links,
they may not like this.

In Excel 97 at least, there doesn't seem to be any alternative to using this
particular option. Excel displays this dialog *before* it runs any AutoOpen or
Workbook_Open macros/event handlers. It's possible to use a macro to open all
your files, but this can get real old real fast. Still, an example.


Sub foo()
Dim fn As Variant, wb As Workbook

fn = Application.GetOpenFilename

If TypeName(fn) = "String" Then _
Set wb = Workbooks.Open(FileName:=fn, UpdateLinks:=1)

End Sub

--
Never attach files.
Snip unnecessary quoted text.
Never multipost (though crossposting is usually OK).
Don't change subject lines because it corrupts Google newsgroup archives.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.