I have a macro to update a large group of workbooks (book01, book02, .....book65) without having the need to open and close all 65 of them.
However, with each loop of each workbook Excel prompts me to click "update" links and then click "continue". Is there a script that will do this for me that I can insert into the below?
BTW: I borrowed this script from an earlier respondent who kindly put me on my way. I have since edited it using my very basic knowledge of vba.
Many thanks for reading.
Dim MyPath As String
Dim MyFile As String
Dim Wkb As Workbook
Dim Cnt As Long
Application.ScreenUpdating = False
MyPath = "C:\folder1\folder2\" 'change the path accordingly
If Right(MyPath, 1) <> "\" Then MyPath = MyPath & "\"
MyFile = Dir(MyPath & "book*.xlsm")
Cnt = 0
Do While Len(MyFile) > 0
Cnt = Cnt + 1
Set Wkb = Workbooks.Open(MyPath & MyFile)
MyFile = Dir
If Cnt > 0 Then
MsgBox "Completed...", vbExclamation
MsgBox "No files were found!", vbExclamation
Application.ScreenUpdating = True