Many thanks for this Mumps1 - this is super helpful; I'm currently trying to split my code into different sections, I am going to try and have a sub function which checks out, opens and unprotects each of the listed workbooks, and a sub routine that saves, protects, closes and checks in the listed workbooks so that they can be called elsewhere in the code when needed.
The check out, open and unprotect code I've attempted is below, does this look correct to you? I've defined the file paths and file names in the main body of the code and passed them to the sub routine:
Sub CheckOutOpen(strFullDesc1 As String, strFullDesc2 As String, strFullDesc3 As String)
If Application.Workbooks.CanCheckOut(strFullDesc1, strFullDesc2, strFullDesc3) = True Then
Application.Workbooks.CheckOut strFullDesc1
Application.Workbooks.Open strFullDesc1
'.Unprotect workbook 1 here
Application.Workbooks.CheckOut strFullDesc2
Application.Workbooks.Open strFullDesc2
'.Unprotect workbook 2 here
Application.Workbooks.CheckOut strFullDesc3
Application.Workbooks.Open strFullDesc3
'.Unprotect workbook 3 here
End If
Thanks again...
Bookmarks