Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
WCM WCM is offline
external usenet poster
 
Posts: 59
Default Insert Row (Event Classification)

Hi ...

Using VBA on Worksheet Events I have been able to get two pivot tables on
the same Worksheet to behave exactly like I need them to, EXCEPT for two
Events:

I can't seem to locate the Events that comprise the action 'Insert Row' or
'Insert Column', and I need the VBA code to react to those two events.

Anybody know what Worksheet Events cover 'Insert Row' and 'Insert Column'?

Thanks for your help ...

William 3

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Insert Row (Event Classification)

The _Change() event fires. Target.Address will be either a column reference
such as $C:$C or a row reference as $2:$2.

It's easy to determine what events fire and when they fire by placing a
simple MsgBox action within them and observing what messages you get as you
make various actions, such as:

Private Sub Worksheet_Activate()
MsgBox "Activate Fired"
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox "BeforeDoubleClick Fired at " & Target.Address
End Sub

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox "BeforeRightClick Fired at " & Target.Address
End Sub

Private Sub Worksheet_Calculate()
MsgBox "Calculate Fired"
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "Change Fired " & Target.Address
End Sub

Private Sub Worksheet_Deactivate()
MsgBox "Deactivate Fired"
End Sub

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
MsgBox "FollowHyperlink Fired at " & Target.Address
End Sub

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
MsgBox "PivotTableUpdate Fired at " & Target.Address
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "SelectionChange Fired at " & Target.Address
End Sub


"WCM" wrote:

Hi ...

Using VBA on Worksheet Events I have been able to get two pivot tables on
the same Worksheet to behave exactly like I need them to, EXCEPT for two
Events:

I can't seem to locate the Events that comprise the action 'Insert Row' or
'Insert Column', and I need the VBA code to react to those two events.

Anybody know what Worksheet Events cover 'Insert Row' and 'Insert Column'?

Thanks for your help ...

William 3

  #3   Report Post  
Posted to microsoft.public.excel.misc
WCM WCM is offline
external usenet poster
 
Posts: 59
Default Insert Row (Event Classification)

Hi J ...

Thanks for the reply. I finally got it to work by using the
Workbook_SheetChange Event. Problem with that Event is that it is really
sensitive (fires for any change, no matter what), but I was able to condition
it so that it only does stuff when I need it to. Thanks again ...

Bill



"JLatham" wrote:

The _Change() event fires. Target.Address will be either a column reference
such as $C:$C or a row reference as $2:$2.

It's easy to determine what events fire and when they fire by placing a
simple MsgBox action within them and observing what messages you get as you
make various actions, such as:

Private Sub Worksheet_Activate()
MsgBox "Activate Fired"
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox "BeforeDoubleClick Fired at " & Target.Address
End Sub

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox "BeforeRightClick Fired at " & Target.Address
End Sub

Private Sub Worksheet_Calculate()
MsgBox "Calculate Fired"
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "Change Fired " & Target.Address
End Sub

Private Sub Worksheet_Deactivate()
MsgBox "Deactivate Fired"
End Sub

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
MsgBox "FollowHyperlink Fired at " & Target.Address
End Sub

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
MsgBox "PivotTableUpdate Fired at " & Target.Address
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "SelectionChange Fired at " & Target.Address
End Sub


"WCM" wrote:

Hi ...

Using VBA on Worksheet Events I have been able to get two pivot tables on
the same Worksheet to behave exactly like I need them to, EXCEPT for two
Events:

I can't seem to locate the Events that comprise the action 'Insert Row' or
'Insert Column', and I need the VBA code to react to those two events.

Anybody know what Worksheet Events cover 'Insert Row' and 'Insert Column'?

Thanks for your help ...

William 3

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Insert Row (Event Classification)

You could continue to use the Workbook_SheetChange() event if you're
concerned with changes on several possible sheets. You could use the
individual Worksheet_Change() event if you are only concerned with a very few
sheets in a workbook with many sheets in it - less overhead in terms of
processing time since you wouldn't be testing all cases and just aborting the
processing more often than not.

"WCM" wrote:

Hi J ...

Thanks for the reply. I finally got it to work by using the
Workbook_SheetChange Event. Problem with that Event is that it is really
sensitive (fires for any change, no matter what), but I was able to condition
it so that it only does stuff when I need it to. Thanks again ...

Bill



"JLatham" wrote:

The _Change() event fires. Target.Address will be either a column reference
such as $C:$C or a row reference as $2:$2.

It's easy to determine what events fire and when they fire by placing a
simple MsgBox action within them and observing what messages you get as you
make various actions, such as:

Private Sub Worksheet_Activate()
MsgBox "Activate Fired"
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox "BeforeDoubleClick Fired at " & Target.Address
End Sub

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox "BeforeRightClick Fired at " & Target.Address
End Sub

Private Sub Worksheet_Calculate()
MsgBox "Calculate Fired"
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "Change Fired " & Target.Address
End Sub

Private Sub Worksheet_Deactivate()
MsgBox "Deactivate Fired"
End Sub

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
MsgBox "FollowHyperlink Fired at " & Target.Address
End Sub

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
MsgBox "PivotTableUpdate Fired at " & Target.Address
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "SelectionChange Fired at " & Target.Address
End Sub


"WCM" wrote:

Hi ...

Using VBA on Worksheet Events I have been able to get two pivot tables on
the same Worksheet to behave exactly like I need them to, EXCEPT for two
Events:

I can't seem to locate the Events that comprise the action 'Insert Row' or
'Insert Column', and I need the VBA code to react to those two events.

Anybody know what Worksheet Events cover 'Insert Row' and 'Insert Column'?

Thanks for your help ...

William 3

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
mouse over event rk0909 Excel Discussion (Misc queries) 1 September 3rd 06 02:51 PM
Wierd event Freddie Excel Discussion (Misc queries) 0 March 17th 06 02:49 PM
How to Track Column Insert/Delete Event in Excel mac_excel New Users to Excel 3 July 8th 05 12:11 AM
Change Font Color Based on Classification sip8316 Excel Discussion (Misc queries) 3 June 2nd 05 07:15 PM
Change of Row event crazybass2 Excel Discussion (Misc queries) 7 December 7th 04 06:21 PM


All times are GMT +1. The time now is 04:08 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"