JohnBailey Posted March 21, 2007 Posted March 21, 2007 I understand that $oExcel.AskToUpdateLinks = falsewill automatically select yes and update the links. However, I want it to automatically select no, thus not updating the links. Does any one know a way to do this through COM and not through click the no button?Where I'm pulling my infohttp://msdn2.microsoft.com/en-us/library/bb220846.aspx A decision is a powerful thing
seandisanti Posted March 21, 2007 Posted March 21, 2007 JohnBailey said: I understand that $oExcel.AskToUpdateLinks = false will automatically select yes and update the links. However, I want it to automatically select no, thus not updating the links. Does any one know a way to do this through COM and not through click the no button? Where I'm pulling my info http://msdn2.microsoft.com/en-us/library/bb220846.aspxtry setting AskToUpdateLinks to True and $oExcel.DisplayAlerts to False
JohnBailey Posted March 21, 2007 Author Posted March 21, 2007 (edited) nope that doesn't work thanks though! btw, as you can see this COM method has enlightened me Thank you SO much for that tip!! Edited March 21, 2007 by JohnBailey A decision is a powerful thing
seandisanti Posted March 21, 2007 Posted March 21, 2007 JohnBailey said: nope that doesn't workthanks though!btw, as you can see this COM method has enlightened me Thank you SO much for that tip!!always glad to help, i'll look into it a little bit more and see if we can't get this working.... do you have a sample spreadsheet to use for testing?
JohnBailey Posted March 21, 2007 Author Posted March 21, 2007 Here are the example files testtest2test.xls updates from test2.xlsThere are no macros just the formula for updating. I'm working on figuring this out to. It is important that I figure it out besides the fact that I'm curious. A decision is a powerful thing
seandisanti Posted March 21, 2007 Posted March 21, 2007 JohnBailey said: Here are the example files testtest2test.xls updates from test2.xlsThere are no macros just the formula for updating. I'm working on figuring this out to. It is important that I figure it out besides the fact that I'm curious.i'm going to start playing with it now, but i only have about 30 minutes until lunch. i'll try to figure something out before i go.
JohnBailey Posted March 21, 2007 Author Posted March 21, 2007 The reason DisplayAlerts won't work for accomplishing this task (I believe) is as follows:"The default value is True. Set this property to False if you dont want to be disturbed by prompts and alert messages while a macro is running; any time a message requires a response, Microsoft Excel chooses the default response."-http://msdn2.microsoft.com/en-us/library/bb177478.aspx A decision is a powerful thing
seandisanti Posted March 21, 2007 Posted March 21, 2007 JohnBailey said: The reason DisplayAlerts won't work for accomplishing this task (I believe) is as follows: "The default value is True. Set this property to False if you dont want to be disturbed by prompts and alert messages while a macro is running; any time a message requires a response, Microsoft Excel chooses the default response." -http://msdn2.microsoft.com/en-us/library/bb177478.aspxi was working on breaking the link before opening, but was getting prompted anyway, even with display alerts off. so i looked into it a little, and remembered something.... with workbooks.open() the second parameter is the update links parameter, so something like this would do what you want.... $oex = ObjCreate("excel.Application") $mywb = $oex.workbooks.Open("u:\test.xls",False) would open and not link.
JohnBailey Posted March 21, 2007 Author Posted March 21, 2007 THAT'S IT!!!!!!!! Do you know where there is an explanation of what the second parameter means and any additional parameters? A decision is a powerful thing
JohnBailey Posted March 21, 2007 Author Posted March 21, 2007 found ithttp://msdn2.microsoft.com/en-us/library/bb179167.aspx A decision is a powerful thing
seandisanti Posted March 21, 2007 Posted March 21, 2007 JohnBailey said: THAT'S IT!!!!!!!! Do you know where there is an explanation of what the second parameter means and any additional parameters?glad i could help
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now