ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   preventin links from updating (https://www.excelbanter.com/excel-programming/344967-preventin-links-updating.html)

SandyR

preventin links from updating
 
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!

Ken Shaffer

preventin links from updating
 
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!




Dave Peterson

preventin links from updating
 
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

SandyR

preventin links from updating
 
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!





SandyR

preventin links from updating
 
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

preventin links from updating
 
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

SandyR

preventin links from updating
 
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



All times are GMT +1. The time now is 04:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com