Ever since I put the following code in my sheet, I get run time errors.
For example, in cells B95 - B102, if I simply delete text in a cell, I get an error message that reads:
Run-time error '13': Type mismatch
The debugger brings up the code below and highlights the second line that starts: If Target.Cells.Count = 1 ... etc.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Column = 1 And UCase(Left(Target, 1)) = "H" Then
Target.Offset(0, 26).Value = Application.InputBox(prompt:="Enter number of hours", Type:=1)
End If
End Sub
Can somebody help me fix this?
Thank you
For example, in cells B95 - B102, if I simply delete text in a cell, I get an error message that reads:
Run-time error '13': Type mismatch
The debugger brings up the code below and highlights the second line that starts: If Target.Cells.Count = 1 ... etc.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Column = 1 And UCase(Left(Target, 1)) = "H" Then
Target.Offset(0, 26).Value = Application.InputBox(prompt:="Enter number of hours", Type:=1)
End If
End Sub
Can somebody help me fix this?
Thank you