Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default workbook_open

I have an add-in linked to a template, based on which a file is created. When
the user opens this file, he is prompted about updating links.

To avoid it, I tried

sub Workbook_Open()
..........
ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
........

which doesn't work, because the message pops up before _open is run. How do
I get this to work ???

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default workbook_open

I assume you have Excel 2002 or 2003 because the UpdateLinks method is only
available in them. First you can get rid of that code you've written since
it closes the barn door after the horses have left.. Then (with the
workbook active) go into Edit, Links and click Startup Prompt and pick the
action you want.

--
Jim Rech
Excel MVP
"julio" wrote in message
...
I have an add-in linked to a template, based on which a file is created.
When
the user opens this file, he is prompted about updating links.

To avoid it, I tried

sub Workbook_Open()
..........
ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
........

which doesn't work, because the message pops up before _open is run. How
do
I get this to work ???

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default workbook_open

the prompt to update links is fired before any code runs.

You can have the links updated without prompt by going into tools=Options
and on the edit tab, uncheck ask to update automatic links.

In xl2002 and later, you have an option to disable the prompt and not update
under Edit=Links.

In versions earlier than xl2002, there is no option to not update automatic
links and not prompt. You would need to open a 2nd workbook which uses code
to open the workbook with links using

Workbooks.Open "NameofWorkbookwithLinks.xls", updateLinks:=0

--
regards,
Tom Ogilvy

"julio" wrote in message
...
I have an add-in linked to a template, based on which a file is created.

When
the user opens this file, he is prompted about updating links.

To avoid it, I tried

sub Workbook_Open()
..........
ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
........

which doesn't work, because the message pops up before _open is run. How

do
I get this to work ???

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default workbook_open

This is not really what i'm asking. I don't want the user to modify the
behavior of excel each time a new file is created, but rather, the fact that
a file is opened based on the template would programatically determine the
modified behavior. Note that the "LinKs" menu is accessible only after links
are created, so (unless i'm missing something) i can't save the *.xlt file
with "dont update" option active.
thnx
Julio
"Tom Ogilvy" wrote:

the prompt to update links is fired before any code runs.

You can have the links updated without prompt by going into tools=Options
and on the edit tab, uncheck ask to update automatic links.

In xl2002 and later, you have an option to disable the prompt and not update
under Edit=Links.

In versions earlier than xl2002, there is no option to not update automatic
links and not prompt. You would need to open a 2nd workbook which uses code
to open the workbook with links using

Workbooks.Open "NameofWorkbookwithLinks.xls", updateLinks:=0

--
regards,
Tom Ogilvy

"julio" wrote in message
...
I have an add-in linked to a template, based on which a file is created.

When
the user opens this file, he is prompted about updating links.

To avoid it, I tried

sub Workbook_Open()
..........
ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
........

which doesn't work, because the message pops up before _open is run. How

do
I get this to work ???

Thanks





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default workbook_open

That is correct. This is not a workbook setting.

--
Regards,
Tom Ogilvy


"julio" wrote in message
...
This is not really what i'm asking. I don't want the user to modify the
behavior of excel each time a new file is created, but rather, the fact

that
a file is opened based on the template would programatically determine the
modified behavior. Note that the "LinKs" menu is accessible only after

links
are created, so (unless i'm missing something) i can't save the *.xlt file
with "dont update" option active.
thnx
Julio
"Tom Ogilvy" wrote:

the prompt to update links is fired before any code runs.

You can have the links updated without prompt by going into

tools=Options
and on the edit tab, uncheck ask to update automatic links.

In xl2002 and later, you have an option to disable the prompt and not

update
under Edit=Links.

In versions earlier than xl2002, there is no option to not update

automatic
links and not prompt. You would need to open a 2nd workbook which uses

code
to open the workbook with links using

Workbooks.Open "NameofWorkbookwithLinks.xls", updateLinks:=0

--
regards,
Tom Ogilvy

"julio" wrote in message
...
I have an add-in linked to a template, based on which a file is

created.
When
the user opens this file, he is prompted about updating links.

To avoid it, I tried

sub Workbook_Open()
..........
ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
........

which doesn't work, because the message pops up before _open is run.

How
do
I get this to work ???

Thanks







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
Workbook_Open () Bill Martin Excel Discussion (Misc queries) 12 December 20th 05 05:37 PM
Workbook_Open Eric Marple Excel Programming 3 May 10th 04 01:24 AM
Help with Workbook_Open Ruan[_3_] Excel Programming 7 April 28th 04 07:52 AM
Workbook_Open Event Squid[_2_] Excel Programming 7 February 8th 04 06:49 PM
Auto_Open Vs Workbook_open Soniya Excel Programming 2 September 23rd 03 03:56 PM


All times are GMT +1. The time now is 05:32 PM.

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

About Us

"It's about Microsoft Excel"