You could try something like this. GO to the tab that you want to check on
insertion of a row, right click and pull down to VIEW CODE. Copy this code
to that worksheet's code module.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim TgtEmpty As Boolean
Debug.Print Target.Address, Target.Count, IsEmpty(Target)
TgtEmpty = True
If Not Target.Count = 256 Then Exit Sub
For Each tgt In Target
If Not IsEmpty(tgt) Then
MsgBox ("A blank row was not entered")
TgtEmpty = False
Exit For
End If
Next tgt
If TgtEmpty Then
MsgBox ("Target is empty")
End If
try this idea
right click sheet tab>view code>insert this
'-----------copy all below
Public numrows
Private Sub Worksheet_Change(ByVal Target As Range)
newnum = Cells(Rows.Count, "a").End(xlUp).row
If newnum > numrows Then
MsgBox "rows were " & numrows
'your code here and comment out the msgbox lines
numrows = newnum
MsgBox "rows now " & numrows
End If
End Sub
'------------
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.