Multiple page workbook, with hidden sheets shown when on the "Setup" sheet, there is a value placed in a cell (Range is F4:F23). The issue is when you delete the contents of multiple Cells in that range, the pages do not hide, and you get " Run-time error '13': Type mismatch
Tried Target.Range Tried If Not
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = F And Len(Target.Value) > 0 Then
If Evaluate("Countif(F:F," & Target.Address & ")") > 1 Then
MsgBox Target.Value & " is a duplicate entry.", vbExclamation, "Duplicate Entry"
Range(Target.Address).ClearContents
End If
End If
Then goes on for the code to show or hide, and name worksheet based on value entered. (Which works fine)
Selecting and deleting the contents of 1 cell at a time hides the worksheet and does not return an error, deleting the contents of multiple cells returns an error and does not hide the additional worksheets and remove the name. I already have a macro created to clear the setup sheet, but can't use it! I need to be able to clear the contents of multiple cells at a time.