Disable update links dialog box

S

Sandy

Hello!

I don't want the dialog box that says "The workook you
opened contains automatic links . . ." "To update all
linked information, click Yes . . ." to display to the
user. How do I disable it in code?

Your help will be immensely appreciated!

Sandy
 
B

Bruce Cooley

If you're making a copy for people who will not be changing the linked
information, or if you just don't need to change the linked information any
more, you can save it as a different filename, break all the links, and then
save again. That way you retain the original file with live links and you
create one without links.

Bruce Cooley


: Hello!
:
: I don't want the dialog box that says "The workook you
: opened contains automatic links . . ." "To update all
: linked information, click Yes . . ." to display to the
: user. How do I disable it in code?
:
: Your help will be immensely appreciated!
:
: Sandy
 
T

Tom Ogilvy

tools=>Options=>Edit, uncheck
ask to update automatic links.

then the links are updated without prompt. If you don't want them updated,
then there is no option for this except in xl2002.

In Excel 2002, there is an option under the Edit=>Links menu to not prompt
and not update.
 
S

Sandy

Hi Tom!

Thanks for your reply. The reason I was asking for code
to do this is because I am assuming that if the person
receiving the email has "ask to update automatic links"
checked, it will ask them regardless of the fact that my
options are unchecked. Is this a correct assumption? By
the way, this is Excel 97 I am talking about.

Do you know what the code is if my assumption is correct?

Sandy
 
T

Tom Ogilvy

Yes, it will ask. It is based on their setting. This question is asked
long before any code runs, so you can't put code in your workbook that will
supress this prompt.

You can only do this by having the user open a dummy workbook with no links
and have that workbook open the real workbook with code.
 
T

Tom Ogilvy

That will certainly change the setting after the question has been asked.

Regards,
Tom Ogilvy
 
S

Sandy

Dear Rafael:

Thanks. I tried it in Workbook Open and it got rid of the
message, but it popped up a different one . . . Select
sheet to link to, with a list of sheets. Do you know how
to get rid of that too?

Sandy
 
S

Sandy

Dear Tom:

Thanks again! Please see Rafael Ortiz' response and my
response to him.

Sandy
 
S

Sandy

Hi Tom:

Yes, but what about the new message it pops up with . . .
Select sheet to link to, with a list of sheets. Do you
know how to get rid of that?

Sandy
 
R

Rafael Ortiz

Well, the lines of code to literally do what you ask are as follows:

ActiveWorkbook.UpdateRemoteReferences = False
Application.AskToUpdateLinks = False

However, any Excel file that is opened will open with whatever options
were selected at the time the file was last saved. You cannot change
this, even with an "auto open" macro. Of course, after the file has
been opened, you can have a macro change the options, or you could
change them manually.

I am not sure if this helps. But I have tested this on Excel 97, which
I have on my computer at home.

Let me know if I can help further.

Rafael Ortiz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top