Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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!




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to lhide - lock columns (with a passord) BUT without preventin JohnDiese Excel Discussion (Misc queries) 1 June 20th 07 04:24 PM
updating links Laura Jean Excel Worksheet Functions 1 August 19th 06 11:07 AM
Updating Links kt Excel Programming 1 May 27th 05 03:40 AM
Updating links with VBA J. Toews[_3_] Excel Programming 1 October 22nd 04 04:45 PM
Updating Links Jonathan Parminter Excel Programming 6 October 7th 04 12:18 AM


All times are GMT +1. The time now is 12:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"