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 » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2004, 04:32 AM
Ken Shaffer
external usenet poster
 
Posts: n/a
Default how to skip Update Values dialog when links change tonon-existent spreadsheets?

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

  #2  
Old June 2nd, 2004, 09:43 AM
Bill Manville
external usenet poster
 
Posts: n/a
Default how to skip Update Values dialog when links change to non-existent spreadsheets?

Ken Shaffer wrote:
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

  #4  
Old June 6th, 2004, 12:01 PM
Bill Manville
external usenet poster
 
Posts: n/a
Default how to skip Update Values dialog when links change to non-existent spreadsheets?

Ken Shaffer wrote:
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

 




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 11:41 AM.


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