A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

event vba



 
 
Thread Tools Display Modes
  #1  
Old November 10th, 2008, 11:13 PM posted to microsoft.public.excel.worksheet.functions
irosh
external usenet poster
 
Posts: 3
Default event vba

hi all

how can i intercept an add entire row event ?
  #2  
Old November 10th, 2008, 11:30 PM posted to microsoft.public.excel.worksheet.functions
Gary''s Student
external usenet poster
 
Posts: 7,584
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  
Old November 10th, 2008, 11:46 PM posted to microsoft.public.excel.worksheet.functions
irosh
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  
Old November 11th, 2008, 12:46 AM posted to microsoft.public.excel.worksheet.functions
ShaneDevenshire
external usenet poster
 
Posts: 2,232
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  
Old November 11th, 2008, 09:25 AM posted to microsoft.public.excel.worksheet.functions
irosh
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:44 PM.


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