View Full Version : Stop dialog box popping up
arrun
07-23-2010, 10:10 PM
Dear all, I have an excel file which has a link to a word. Whenever I open this excel file, at the point of opening, a dialog box pops-up saying, "this workbook contains links to other data sources.......update? dont update? help" I would like to stop this dialog box popping up. Is there any VBA code which can be placed with the workbook_open event to stop that?
Thanks,
Simon Lloyd
07-24-2010, 12:55 AM
What do you want to do with the links? always update, never update or ask to update?
arrun
07-24-2010, 12:57 AM
I want "never update"
Simon Lloyd
07-24-2010, 01:04 AM
Add this to the ThisWorkbook code module:
Private Sub Workbook_Open()
Me.UpdateLinks = xlUpdateLinksNever
End Sub
How to Save a Workbook Event Macro
1. Copy the macro above
2. Open your Workbook and press ALT+F11 keys to open the Visual Basic Editor.
3. Press CTRL+R keys to shift the focus to the Project Explorer Window
4. Press the Down Arrow Key until ThisWorkbook is highlighted in blue.
5. Press the Enter key to move the cursor to the Code Window
6. Paste the macro code using CTRL+V
7. Save the macro in your Workbook using CTRL+S
arrun
07-24-2010, 01:09 AM
Thanks Simon for your reply. However your code was generating an error, so I changed it to:
Private Sub ThisWorkbook_Open()
Me.UpdateLinks = xlUpdateLinksNever
End Sub
However above code could not stop popping up that dialog box. I am using office-2010. Is there any better idea?
Thanks,
mdmackillop
07-24-2010, 01:29 AM
Simon's code works for me in 2010. Check you have it in ThisWorkbook module.
Simon Lloyd
07-24-2010, 01:58 AM
Thanks Simon for your reply. However your code was generating an error, so I changed it to:
Private Sub ThisWorkbook_Open()
Me.UpdateLinks = xlUpdateLinksNever
End Sub
However above code could not stop popping up that dialog box. I am using office-2010. Is there any better idea?
Thanks,The code i supplied works for me in xl2003, xl2007 & xl2010, as MD said did you folllow my instructions on adding it to the ThisWorkbook code module?, just adding ThisWorkbook to OPEN won't make any difference to the problem it simply stops the code being workbook event code.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.