Update Links - Yes without user input

  • Thread starter Thread starter BUDDY
  • Start date Start date
B

BUDDY

A template I call has external links that I'd like
updated, but I don't want to manually click "YES" upon
being prompted. Help?!

TIA
 
Hi
try adding the line
Application.AskToUpdateLinks = False
to your code prior to opening the other workbook
 
There's an option that affects all workbooks you open under:
tools|Options|Edit tab|Ask to update automatic links

If you uncheck this, then every workbook you open that has external links will
be updated without the prompt.

This is a user-by-user setting. You can't change it for someone else (well,
unless you go to their pc and make the change!).

xl2002 added another links option under:
Edit|Links|Startup Prompt Button

=======
But if you open that template in code, you can use a setting on the
workbooks.open statement:

Option Explicit
Sub testme01()

Dim newWkbk As Workbook
Set newWkbk = Workbooks.Open(Filename:="C:\my documents\excel\book1.xlt", _
UpdateLinks:=True, editable:=False)

End Sub

(The editable:=false is the default, but I like to show it. It's kind of nice
self-documenting (again) comment.)
 

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

Back
Top