Hi.
Not sure what i'm doing wrong here but excel is sending me an error message. Basically what i'm trying to do is have an automatic code run only if a certain cell is empty, see below ( i made the font red where the code error refers to):
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("AU26") = "" Then
If Target.Address <> "$F$14" And Target.Address <> "$E$3" And Not Target.Column > 12 Then
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
End If
If Target.Address(0, 0) = "E3" And Target.Value <> "" Then
Target.Value = Application.WorksheetFunction.Proper(Target.Value)
End If
If Target.Address(0, 0) = "F8" And Target.Value <> "" Then
Range("D22").Value = Target
End If
If Target.Address(0, 0) = "F10" And Target.Value <> "" Then
Range("D23").Value = Target
Range("N8").Value = Target
Range("N8").Value = Application.WorksheetFunction.Proper(Range("N8").Value)
End If
If Target.Address(0, 0) = "F12" And Target.Value <> "" Then
Range("D23").Value = Range("F10") & " " & Target
Range("N8").Value = Range("F10") & " " & Target
Range("N8").Value = Application.WorksheetFunction.Proper(Range("N8").Value)
End If
If Target.Address(0, 0) = "N8" And Target.Value <> "" Then
Target.Value = Application.WorksheetFunction.Proper(Target.Value)
End If
ErrHandler:
Application.EnableEvents = True
End If
End Sub
Bookmarks