PDA

View Full Version : Solved: code to turn on update links



drawworkhome
11-26-2009, 09:23 PM
hi all,
i have a workbook sheet (it used to be a sheet in my main workbook and i copied it as a seperate sheet in a new workbook) that is referenced by the "main" workbook i use most. it now asks me to update links which is ok but i would like to programmatically handle that so the user doesnt have to. any suggestions??
thank you
erik

JP2112
11-27-2009, 10:25 AM
If this is a one-off situation, why not do it manually?

Go to Edit > Links and turn them off from there

Or check out the Application.AskToUpdateLinks Property.

RolfJ
11-27-2009, 10:26 AM
Hi Erik:

you should not have to do this programmatically. Have you already tried to change the external links alert settings? If not, here's how you do that:

From the Main Menu in Excel2003: Edit | Links
(if you are working with Excel2007 use 'Data | Edit Links')
In the 'Edit Links' dialog click on 'Startup Prompt'
Select 'Don't display the alert and update the links'

drawworkhome
11-27-2009, 04:39 PM
If this is a one-off situation, why not do it manually?

Go to Edit > Links and turn them off from there

Or check out the Application.AskToUpdateLinks Property.
i am looking for options. my "users", aka coworkers can be quite stubborn on things....

JP2112
11-27-2009, 05:04 PM
You could put it into the Open event for the workbook (see http://msdn.microsoft.com/en-us/library/aa220927%28office.11%29.aspx)

i.e.

Private Sub Workbook_Open()
Application.AskToUpdateLinks = False
End Sub

Place this code in the ThisWorkbook module for the secondary workbook. However this introduces other problems: Your users might be prompted to enable macros every time the workbook is opened.

drawworkhome
11-27-2009, 09:26 PM
thank you for the info jp2112
e