I have two worksheets that are created during calculations that need to be deleted after processing by Macro. Deletion need to be carried out when a Form control button is activated, but when the sheets are not present, as they are in some instances I get errors.
The code I am using is :-
Function TheSheetExists() As Boolean
TheSheetExists = False
On Error GoTo NoSuchSheet
If Len(Sheets("Customer Quote").Name) > 0 Then
TheSheetExists = True
Exit Function
End If
NoSuchSheet:
End Function
Any Ideas would be welcome
The code I am using is :-
Function TheSheetExists() As Boolean
TheSheetExists = False
On Error GoTo NoSuchSheet
If Len(Sheets("Customer Quote").Name) > 0 Then
TheSheetExists = True
Exit Function
End If
NoSuchSheet:
End Function
Any Ideas would be welcome