Hi all, this is my first time attempting any VBA at all I've had success in getting both options I want to work separately but not together.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Select Case Range("c2")
End Select
If Range("c2").Value = "New Customer" Then Rows(5).Hidden = False Else Rows(5).Hidden = True
If Range("b5:e5").Value = "" And Rows(5).Hidden = True Then Range("b5:e5").ClearContents Else Exit Sub
End Sub
This is what I have so far when trying to get both to work at same time.
The end result I am looking for is the row 5 to hide and unhide based off my drop down list, which is working. Then when the row 5 is hidden to check cells in range b5:e5 for any content and if there is any to delete it.
Run-time error '13':
Type mismatch is currently the error I am receiving
Any and all help is greatly appreciated. I have no deadline on this just thought it be fun to learn VBA and wanted to do some cool stuff.
Bookmarks