Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to open spreadsheets in VBA without updating the links. I have
tried several different syntaxes to prevent the update, but it still tries to update when it opens. The relevant code is: Set sourcebook = Workbooks.Open(fnames, UPDATELINKS:=False) Fnames is derived from cells in the worksheet. I have tried setting updatelinks as an integer variable and setting it to zero. I have also tried substituting xlupdatelinksnever for the UPDATELINKS:=False. Can someone suggest an alternative that will work? Thanks in advance for your help! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
xl.AskToUpdateLinks = False where xl is the excel application object. "SandyR" wrote in message ... I am trying to open spreadsheets in VBA without updating the links. I have tried several different syntaxes to prevent the update, but it still tries to update when it opens. The relevant code is: Set sourcebook = Workbooks.Open(fnames, UPDATELINKS:=False) Fnames is derived from cells in the worksheet. I have tried setting updatelinks as an integer variable and setting it to zero. I have also tried substituting xlupdatelinksnever for the UPDATELINKS:=False. Can someone suggest an alternative that will work? Thanks in advance for your help! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Updatelinks:=0
would seem to follow VBA's help. If the other workbooks are open, then excel will update the links? Could that be the problem? How do you know that the links are trying to be updated? If you're seeing an error message instead of the old value that was there... Jim Rech posted a registry tweak: http://groups.google.com/groups?thre...GP11.phx .gbl SandyR wrote: I am trying to open spreadsheets in VBA without updating the links. I have tried several different syntaxes to prevent the update, but it still tries to update when it opens. The relevant code is: Set sourcebook = Workbooks.Open(fnames, UPDATELINKS:=False) Fnames is derived from cells in the worksheet. I have tried setting updatelinks as an integer variable and setting it to zero. I have also tried substituting xlupdatelinksnever for the UPDATELINKS:=False. Can someone suggest an alternative that will work? Thanks in advance for your help! -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Visual Basic 6.3, which doesn't seem to have that as an option.
Also, the object doesn't exist until I open it, at which point it is too late. "Ken Shaffer" wrote: Try xl.AskToUpdateLinks = False where xl is the excel application object. "SandyR" wrote in message ... I am trying to open spreadsheets in VBA without updating the links. I have tried several different syntaxes to prevent the update, but it still tries to update when it opens. The relevant code is: Set sourcebook = Workbooks.Open(fnames, UPDATELINKS:=False) Fnames is derived from cells in the worksheet. I have tried setting updatelinks as an integer variable and setting it to zero. I have also tried substituting xlupdatelinksnever for the UPDATELINKS:=False. Can someone suggest an alternative that will work? Thanks in advance for your help! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know that the links are being updated because it asks for a reference.
Other spreadsheets are opened - also with updatelinks set to 0. I don't know if it is actually trying to update the other ones. I don't really care whether it updates the links or not - I just don't want it to ask the user for anything. "Dave Peterson" wrote: Updatelinks:=0 would seem to follow VBA's help. If the other workbooks are open, then excel will update the links? Could that be the problem? How do you know that the links are trying to be updated? If you're seeing an error message instead of the old value that was there... Jim Rech posted a registry tweak: http://groups.google.com/groups?thre...GP11.phx .gbl SandyR wrote: I am trying to open spreadsheets in VBA without updating the links. I have tried several different syntaxes to prevent the update, but it still tries to update when it opens. The relevant code is: Set sourcebook = Workbooks.Open(fnames, UPDATELINKS:=False) Fnames is derived from cells in the worksheet. I have tried setting updatelinks as an integer variable and setting it to zero. I have also tried substituting xlupdatelinksnever for the UPDATELINKS:=False. Can someone suggest an alternative that will work? Thanks in advance for your help! -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you're being prompted for a replacement link, then it sounds like that the
other workbook has been moved/renamed/deleted. But in my simple tests in xl2003, even after I deleted the file that was linked-to, I could use the code to open the first workbook (with that code) and not get prompted for that replacement workbook link. I don't have a guess. Sorry. SandyR wrote: I know that the links are being updated because it asks for a reference. Other spreadsheets are opened - also with updatelinks set to 0. I don't know if it is actually trying to update the other ones. I don't really care whether it updates the links or not - I just don't want it to ask the user for anything. "Dave Peterson" wrote: Updatelinks:=0 would seem to follow VBA's help. If the other workbooks are open, then excel will update the links? Could that be the problem? How do you know that the links are trying to be updated? If you're seeing an error message instead of the old value that was there... Jim Rech posted a registry tweak: http://groups.google.com/groups?thre...GP11.phx .gbl SandyR wrote: I am trying to open spreadsheets in VBA without updating the links. I have tried several different syntaxes to prevent the update, but it still tries to update when it opens. The relevant code is: Set sourcebook = Workbooks.Open(fnames, UPDATELINKS:=False) Fnames is derived from cells in the worksheet. I have tried setting updatelinks as an integer variable and setting it to zero. I have also tried substituting xlupdatelinksnever for the UPDATELINKS:=False. Can someone suggest an alternative that will work? Thanks in advance for your help! -- Dave Peterson -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using xl 2002. The reference that it is asking for is another sheet in
the same workbook, so I don't understand why it is asking at all! "Dave Peterson" wrote: If you're being prompted for a replacement link, then it sounds like that the other workbook has been moved/renamed/deleted. But in my simple tests in xl2003, even after I deleted the file that was linked-to, I could use the code to open the first workbook (with that code) and not get prompted for that replacement workbook link. I don't have a guess. Sorry. SandyR wrote: I know that the links are being updated because it asks for a reference. Other spreadsheets are opened - also with updatelinks set to 0. I don't know if it is actually trying to update the other ones. I don't really care whether it updates the links or not - I just don't want it to ask the user for anything. "Dave Peterson" wrote: Updatelinks:=0 would seem to follow VBA's help. If the other workbooks are open, then excel will update the links? Could that be the problem? How do you know that the links are trying to be updated? If you're seeing an error message instead of the old value that was there... Jim Rech posted a registry tweak: http://groups.google.com/groups?thre...GP11.phx .gbl SandyR wrote: I am trying to open spreadsheets in VBA without updating the links. I have tried several different syntaxes to prevent the update, but it still tries to update when it opens. The relevant code is: Set sourcebook = Workbooks.Open(fnames, UPDATELINKS:=False) Fnames is derived from cells in the worksheet. I have tried setting updatelinks as an integer variable and setting it to zero. I have also tried substituting xlupdatelinksnever for the UPDATELINKS:=False. Can someone suggest an alternative that will work? Thanks in advance for your help! -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to lhide - lock columns (with a passord) BUT without preventin | Excel Discussion (Misc queries) | |||
updating links | Excel Worksheet Functions | |||
Updating Links | Excel Programming | |||
Updating links with VBA | Excel Programming | |||
Updating Links | Excel Programming |