I have a file called Travel Orders which when opened checks another file called "FL_Version_Checker". If the version numbers match then the Travel Orders file stays open and can be used. If they do not match, the Travel Orders file closes and gives an error message. The problem is that the status bar keeps showing the message "Checking Travel Orders Version. Please Wait...." even if they match. I would like the status bar to update if they match and show a message that says "Version Match Please Continue" Not sure how to do that. My VB code is as follows:
I'm not sure how to add the "Version Match Please Continue" part?
VBA Code:
Private Sub Workbook_Open()
Sheets("Travel Orders").Activate
With Application
.EnableEvents = False
.ScreenUpdating = False
.StatusBar = "Checking Travel Orders Version. Please wait..."
End With
Workbooks.Open "https://path to/FL_Version_Checker.xlsm", , True
Workbooks("Travel Orders.xlsm").Activate
If Workbooks("Travel Orders.xlsm").Sheets("Travel Orders").Range("M1").Value <> Workbooks("FL_Version_Checker.xlsm").Sheets("Version").Range("C3").Value Then
Application.StatusBar = "You are running an old version of 'Travel Orders'. Please download the newest version from iShare."
MsgBox "You are running an old version of 'Travel Orders'. Please download the newest version from iShare.", 16, "Wrong Version"
Workbooks("FL_Version_Checker.xlsm").Close SaveChanges:=False
With Application
.EnableEvents = True
.StatusBar = ""
End With
Workbooks("Travel Orders.xlsm").Close SaveChanges:=False
End If
Workbooks("FL_Version_Checker.xlsm").Close SaveChanges:=False
End Sub
I'm not sure how to add the "Version Match Please Continue" part?