Victor Moss
Board Regular
- Joined
- May 3, 2014
- Messages
- 90
Hi Guys,
I have a Change Events running when I enter any value in Range("H5:H6000"), if all Cells in the Active Row are blank between columns A and F, the Change Event will clear the Active Cell in Column H of the same Row:
If Target.Count > 1 Then Exit Sub
If Target.Column = 8 Then
If Target.Offset(, -7).Value = "" And Target.Offset(, -6).Value = "" And Target.Offset(, -5).Value = "" And Target.Offset(, -4).Value = "" And Target.Offset(, -3).Value = "" And Target.Offset(, -2).Value = "" Then
MsgBox "My message here", vbInformation
Application.EnableEvents = False
Target.ClearContents
Target.Select
Application.EnableEvents = True
If WorksheetFunction.CountA(Cells) = 0 Then Me.ScrollArea = ""
End If
End If
The problem I'm experiencing is if I drag and drop a value in Range("H5:H6000") below where there's data, the Change Event doesn't clear the Cells where there's no data in Range("A5:F6000"), it only clear's the first cell.Count -1).
Has any experienced the same problem? Please, if you can help, it would be greatly appreciated.
I have a Change Events running when I enter any value in Range("H5:H6000"), if all Cells in the Active Row are blank between columns A and F, the Change Event will clear the Active Cell in Column H of the same Row:
If Target.Count > 1 Then Exit Sub
If Target.Column = 8 Then
If Target.Offset(, -7).Value = "" And Target.Offset(, -6).Value = "" And Target.Offset(, -5).Value = "" And Target.Offset(, -4).Value = "" And Target.Offset(, -3).Value = "" And Target.Offset(, -2).Value = "" Then
MsgBox "My message here", vbInformation
Application.EnableEvents = False
Target.ClearContents
Target.Select
Application.EnableEvents = True
If WorksheetFunction.CountA(Cells) = 0 Then Me.ScrollArea = ""
End If
End If
The problem I'm experiencing is if I drag and drop a value in Range("H5:H6000") below where there's data, the Change Event doesn't clear the Cells where there's no data in Range("A5:F6000"), it only clear's the first cell.Count -1).
Has any experienced the same problem? Please, if you can help, it would be greatly appreciated.