Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Links / June 2004

Tip: Looking for answers? Try searching our database.

how to skip Update Values dialog when links change to    non-existent spreadsheets?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken Shaffer - 02 Jun 2004 04:32 GMT
I have a VBA subroutine within an excel spreadsheet which goes through
several cells containing links to external spreadsheets and changes the
formulas containing those links to point to a different spreadsheet based on
the date.

It works, kinda, except for the annoying popups which occur from trying to
link to non-existing spreadsheets. The title shows "Update Values:" with a
spreadsheet link.

I was wondering if there's a way to prevent these dialogs from showing up
when a link was changed in a formula to now point to a non-existent
spreadsheet.

The formulas contain something like "if(iserror(vlookup( referencing an
external spreadsheet)), "ND", vlookup(..))".

Come to think of it, is there a way to check if the spreadsheet exists
before even attempting a link to it in a formula and yet still keep the
formula?

--
Ken Shaffer
Bill Manville - 02 Jun 2004 09:43 GMT
> I was wondering if there's a way to prevent these dialogs from showing up
> when a link was changed in a formula to now point to a non-existent
> spreadsheet.

Application.DisplayAlerts = False
ActiveCell.Formula = ....
Application.DisplayAlerts = True

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
Ken Shaffer - 06 Jun 2004 02:43 GMT
> Application.DisplayAlerts = False
> ActiveCell.Formula = ....
> Application.DisplayAlerts = True

Works great but takes very long. Appears as though links are actually being
updated.  Any way to change links in formulas without an update occurring?

Ken Shaffer
Bill Manville - 06 Jun 2004 12:01 GMT
> Works great but takes very long. Appears as though links are actually being
> updated.  Any way to change links in formulas without an update occurring?

No.
Ideas for improving speed:
- manual calculation
- if there are a number of cells with the same formula (apart from relative
adjustments) set them all at once e.g.
 Selection.FormulaR1C1 = ...
- if there are lots of different formulas you could try
 ActiveCell.Formula = "!$" & "the formula you would have used without the ="
 followed by a global replacement of !$ with =
 
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.