G Gary''s Student Nov 10, 2008 #2 Just use the Change event. Test that Target is only a single row and is a complete row: rivate Sub Worksheet_Change(ByVal Target As Range) If Target.Rows.Count = 1 And Target.Count = 256 Then MsgBox ("Row inserted") End If End Sub This will trap a row being inserted or an entire row being pasted.
Just use the Change event. Test that Target is only a single row and is a complete row: rivate Sub Worksheet_Change(ByVal Target As Range) If Target.Rows.Count = 1 And Target.Count = 256 Then MsgBox ("Row inserted") End If End Sub This will trap a row being inserted or an entire row being pasted.
I irosh Nov 10, 2008 #3 Gary''s Student a écrit : Just use the Change event. Test that Target is only a single row and is a complete row: rivate Sub Worksheet_Change(ByVal Target As Range) If Target.Rows.Count = 1 And Target.Count = 256 Then MsgBox ("Row inserted") End If End Sub This will trap a row being inserted or an entire row being pasted. Click to expand... hi gary thx for your response. but in fact it doesn't work ; the change event work on the cell value .... i just want to trap selection of the entire row. i'm still on trying
Gary''s Student a écrit : Just use the Change event. Test that Target is only a single row and is a complete row: rivate Sub Worksheet_Change(ByVal Target As Range) If Target.Rows.Count = 1 And Target.Count = 256 Then MsgBox ("Row inserted") End If End Sub This will trap a row being inserted or an entire row being pasted. Click to expand... hi gary thx for your response. but in fact it doesn't work ; the change event work on the cell value .... i just want to trap selection of the entire row. i'm still on trying
S ShaneDevenshire Nov 11, 2008 #4 Hi, If you want to trap the select why not use the SelectionChange event instead of the Change event?
Hi, If you want to trap the select why not use the SelectionChange event instead of the Change event?
I irosh Nov 11, 2008 #5 ShaneDevenshire a écrit : Hi, If you want to trap the select why not use the SelectionChange event instead of the Change event? Click to expand... i want to trap an entire row add ; the event effectively traped on selectionchange but nothing after added row very difficult
ShaneDevenshire a écrit : Hi, If you want to trap the select why not use the SelectionChange event instead of the Change event? Click to expand... i want to trap an entire row add ; the event effectively traped on selectionchange but nothing after added row very difficult