I have an excel workbook and it regularly errors out on people when 1 of two conditions are not met when a macro is run, so I would like to actually check it as part of the macro rather than getting an excel error.
One is if "Sheet 10" is not visible. This usually indicates that there is no data in that sheet, but regardless the macro selects that sheet so if it is not visible, I would prefer it to shoot out a message saying, the sheet is not visible, please ensure you have followed step 1.
The other thing that can cause it to fail is if they have not entered any data.
"Sheet 10" cell B1 can be used to determine if data has been inputted. If that cell is blank, it should also shoot out a message stating that there is no valid user data, please follow step one and enter user data.
In both instances I would like it to then break out of the macro as it will fail otherwise
One is if "Sheet 10" is not visible. This usually indicates that there is no data in that sheet, but regardless the macro selects that sheet so if it is not visible, I would prefer it to shoot out a message saying, the sheet is not visible, please ensure you have followed step 1.
The other thing that can cause it to fail is if they have not entered any data.
"Sheet 10" cell B1 can be used to determine if data has been inputted. If that cell is blank, it should also shoot out a message stating that there is no valid user data, please follow step one and enter user data.
In both instances I would like it to then break out of the macro as it will fail otherwise