Hi, relatively new at using macros, also first post, thanks in advance for any help, current code below
So for example if "Piping" sheet is missing, I am receiving an Error message, but I want the macro to skip to the next sheet, so that the missing sheet is ignored and also the commands in that sheet are ignored,
If any more details are needed please let me know?
Thanks
Mick
Sub Macro3()
'
' Macro3 Macro
'
'
Sheets("Process").Select
ActiveSheet.Unprotect
Sheets("Piping").Select
ActiveSheet.Unprotect
Sheets("Mechanical").Select
ActiveSheet.Unprotect
Sheets("Electrical").Select
ActiveSheet.Unprotect
Sheets("Instrumentation").Select
ActiveSheet.Unprotect
Sheets("Safety").Select
ActiveSheet.Unprotect
Sheets("Civil").Select
ActiveSheet.Unprotect
Sheets("Architecture").Select
ActiveSheet.Unprotect
Sheets("HVAC").Select
ActiveSheet.Unprotect
Sheets("Structural").Select
ActiveSheet.Unprotect
Sheets("Pipeline").Select
ActiveSheet.Unprotect
Sheets("1.Engineering Cost").Select
End Sub
So for example if "Piping" sheet is missing, I am receiving an Error message, but I want the macro to skip to the next sheet, so that the missing sheet is ignored and also the commands in that sheet are ignored,
If any more details are needed please let me know?
Thanks
Mick
Sub Macro3()
'
' Macro3 Macro
'
'
Sheets("Process").Select
ActiveSheet.Unprotect
Sheets("Piping").Select
ActiveSheet.Unprotect
Sheets("Mechanical").Select
ActiveSheet.Unprotect
Sheets("Electrical").Select
ActiveSheet.Unprotect
Sheets("Instrumentation").Select
ActiveSheet.Unprotect
Sheets("Safety").Select
ActiveSheet.Unprotect
Sheets("Civil").Select
ActiveSheet.Unprotect
Sheets("Architecture").Select
ActiveSheet.Unprotect
Sheets("HVAC").Select
ActiveSheet.Unprotect
Sheets("Structural").Select
ActiveSheet.Unprotect
Sheets("Pipeline").Select
ActiveSheet.Unprotect
Sheets("1.Engineering Cost").Select
End Sub