|
-
Mar 25th, 2003, 05:42 AM
#1
Thread Starter
Hyperactive Member
XL - Updating Links on open *Resolved*
Hi all,
I programmatically open up an Excel File and do some stuff with it. This is all good.
However it has links in it, so I get that annoying message asking me whether I want to update them when I open the workbook. Is there anyway to stop this message or automatically tell it 'no'?
Thanks
J.
Last edited by Granty; Mar 26th, 2003 at 03:50 AM.
-
Mar 25th, 2003, 06:08 AM
#2
Hi,
You'll want to be looking at the Excel.Application.Displayalerts call to sort this one!
-
Mar 25th, 2003, 06:11 AM
#3
Thread Starter
Hyperactive Member
Thanks for replying Alex.
But I actually use the displayalerts all the time, but it does not seem to get rid of this message. Every other one yes, but this one no
-
Mar 25th, 2003, 06:17 AM
#4
ahh weird, have you tried calling this one beforehand:
Application.Workbooks(1).UpdateLinks xlUpdateLinksNever
-
Mar 25th, 2003, 06:41 AM
#5
Thread Starter
Hyperactive Member
Hmmm....
I get a compile error on that one - doesn't recognise 'xlUpdateLinksNever'
Actually I dont even have 'updatelinks', just the singular 'updatelink' which wants a link name parameter etc.
I am using Access 97 here, referencing the Excel 8.0 library. Will that make the difference?
-
Mar 25th, 2003, 06:45 AM
#6
Thread Starter
Hyperactive Member
Ahhhh...checking on MSDN I am guessing this is an Office XP thing.
Bugger.
-
Mar 25th, 2003, 07:07 AM
#7
Drat, yeah just checked that out myself - it looks to be XP only - back to the drawing board!
-
Mar 25th, 2003, 08:25 AM
#8
Thread Starter
Hyperactive Member
OK, we have Application.AsktoUpdateLinks = False....
But....
This then counts as pressing 'Yes' so does the whole updating thing 
Close but no cigar
-
Mar 25th, 2003, 12:36 PM
#9
Heh I'm at home now using Excel 2000 & have the 97 help files with me now rather than XP - I just found the same one you did: Excel.Application.AskToUpdateLinks = False, but then spotted this explanation from MSDN:
"True if Microsoft Excel asks the user to update links when opening files with links. False if links are automatically updated with no dialog box. Read/write Boolean."
You're right this one is no good whatsoever, but.... I did find that there is a parameter you can set on the workbook open method:
Excel.Application.workbooks.Open _
Filename:="C:\Path\file.xls", Updatelinks:=false
I programmatically open up an Excel File and do some stuff with it. This is all good.
Since you're opening the file through code, you should be able to set this parameter & solve youur problem...
-
Mar 26th, 2003, 03:43 AM
#10
Thread Starter
Hyperactive Member
Superstar! 
Thanks for all your help mate.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|