98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Don't Update Link
Don't Update Link
Resolved · High Priority · Version 2010
Mark has attended:
Excel VBA Intro Intermediate course
Excel Advanced - For Power Users course
Excel PowerPivot course
Excel Dashboards for Business Intelligence course
Don't Update Link
I've stolen a sub routine which will go through a file path, open each file individually apply another subroutine save and close the file and move onto the next file.
However, when opening each individual file I get prompted to either Update or Don't Update links. What piece of code do I need to select Don't Update automatically and then apply the subroutine.
Sub AllFiles()
Dim folderPath As String
Dim filename As String
Dim wb As Workbook
folderPath = "G:\Network Operations Team\2014\MBPC\Network Capacity\Test\"
If Right(folderPath, 1) <> "\" Then folderPath = folderPath + "\"
filename = Dir(folderPath & "*.xlsm")
Do While filename <> ""
Application.ScreenUpdating = False
Set wb = Workbooks.Open(folderPath & filename)
Call Part1
filename = Dir
Loop
Application.ScreenUpdating = True
MsgBox "Patch Applied"
End Sub
Thanks,
Mark
RE: Don't Update Link
Hi Mark
Well done finding the code.
There is a way to stop the update or don't update links message appearing. Include the optional parameter UpdateLinks for the Workbooks.Open method.
Edit the line starting Set wb to...
Set wb = Workbooks.Open(folderPath & filename, UpdateLinks:=0)
If you change your mind and want to update the links Use UpdateLinks:=3 instead.
Thanks for the question, this was a new one for me! Please can you let me know if it works on your files, thanks.
Doug Dunn
Best STL
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Display pictures on Chart Data PointReplacing a single chart data point bar with a picture. |