I somehow want to make an error if a certain condition is not met and have a message box pop up to explain the error and then end my macro, but continue if there is no error.
The condition is this: if the number (value) in a particular cell is not equal to the total number of sheets in my workbook then I want the macro to end and display the message: "You need to Press Ctrl+Shift+C."
The value of the particular cell can be found by the following statement:
Sheets("Initial Input").Range("O10").Value
and the total number of sheets should be able to be found with something like this:
Application.Sheets.Count
I was thinking about using an if statement, but I'm open to using any kind of idea.
The condition is this: if the number (value) in a particular cell is not equal to the total number of sheets in my workbook then I want the macro to end and display the message: "You need to Press Ctrl+Shift+C."
The value of the particular cell can be found by the following statement:
Sheets("Initial Input").Range("O10").Value
and the total number of sheets should be able to be found with something like this:
Application.Sheets.Count
I was thinking about using an if statement, but I'm open to using any kind of idea.