#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default event vba

hi all

how can i intercept an add entire row event ?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default event vba

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.
--
Gary''s Student - gsnu200812


"irosh" wrote:

hi all

how can i intercept an add entire row event ?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default event vba

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.



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 :)
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default event vba

Hi,

If you want to trap the select why not use the SelectionChange event instead
of the Change event?

--
Thanks,
Shane Devenshire


"irosh" wrote:

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.



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 :)

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default event vba

ShaneDevenshire a écrit :
Hi,

If you want to trap the select why not use the SelectionChange event instead
of the Change event?

i want to trap an entire row add ;
the event effectively traped on selectionchange but nothing after
added row :(

very difficult


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Event Steve Excel Discussion (Misc queries) 2 October 14th 08 11:04 PM
event marker68 Excel Discussion (Misc queries) 1 April 4th 08 02:38 PM
Mouse Up or Down Event billinr Excel Discussion (Misc queries) 2 July 5th 07 07:46 PM
Event doesn't fire Frank Xia Excel Discussion (Misc queries) 6 February 11th 06 01:54 AM
Event Macro stevepain Excel Discussion (Misc queries) 6 August 5th 05 05:11 AM


All times are GMT +1. The time now is 06:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"