A
ant
Someone gave me this code... Im new at VB and dont how
to compile this code or it not working
I just want cell D5 to be "-" as its default value until
the user enters a number
Please help
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(.Cells, .Range("D5")) Is
Nothing Then _
If IsEmpty(.Value) Then _
.Value = "-"
End With
End Sub
to compile this code or it not working
I just want cell D5 to be "-" as its default value until
the user enters a number
Please help
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(.Cells, .Range("D5")) Is
Nothing Then _
If IsEmpty(.Value) Then _
.Value = "-"
End With
End Sub