Re-post: Outline Event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi TWIMC
Is there a way to capture the click event of an Outline, (grouped rows or columns). The command line to show a group is ActiveSheet.Outline.ShowLevels RowLevels:=X where X represents the Outline Number. What I need to do is to capture the event when the outline is changed. The only way I can think of capturing the event is to keep checking the outline level within the SheetSelectionChange event but I doubt the event would execute if the outline changed, only when the selection changes. Any ideas on how to capture the event when the outline changes, would be much appreciated

TI
K
 
Can you use the Calculate event? (Or is your workbook using, or likely to
use, Manual Calculation............?)


--
Roger
Shaftesbury (UK)



Kevin McCartney said:
Hi TWIMC,
Is there a way to capture the click event of an Outline, (grouped rows
or columns). The command line to show a group is
ActiveSheet.Outline.ShowLevels RowLevels:=X where X represents the Outline
Number. What I need to do is to capture the event when the outline is
changed. The only way I can think of capturing the event is to keep checking
the outline level within the SheetSelectionChange event but I doubt the
event would execute if the outline changed, only when the selection changes.
Any ideas on how to capture the event when the outline changes, would be
much appreciated.
 
Unfortunately the Calculate Event doesn't activate when changing an Outline, I think I'll have to check the current outline on every selection change but this won't look right because I need to fire events when the outline is changes and not when the user clicks back onto the sheet and then hopefully a different cell

Thanks anywa
cia
K

----- Roger Whitehead wrote: ----

Can you use the Calculate event? (Or is your workbook using, or likely t
use, Manual Calculation............?


--
Roge
Shaftesbury (UK



Kevin McCartney said:
Hi TWIMC
Is there a way to capture the click event of an Outline, (grouped row
or columns). The command line to show a group i
ActiveSheet.Outline.ShowLevels RowLevels:=X where X represents the Outlin
Number. What I need to do is to capture the event when the outline i
changed. The only way I can think of capturing the event is to keep checkin
the outline level within the SheetSelectionChange event but I doubt th
event would execute if the outline changed, only when the selection changes
Any ideas on how to capture the event when the outline changes, would b
much appreciated
 
Hi
even the workbook event 'sheetchange' is not triggered by this action.
I doubt you can catch this event. You may consider using the OnTime
method and constantly checking the outline level (this may slow down
Excel significantly though).

--
Regards
Frank Kabel
Frankfurt, Germany

Kevin McCartney said:
Hi TWIMC,
Is there a way to capture the click event of an Outline, (grouped
rows or columns). The command line to show a group is
ActiveSheet.Outline.ShowLevels RowLevels:=X where X represents the
Outline Number. What I need to do is to capture the event when the
outline is changed. The only way I can think of capturing the event is
to keep checking the outline level within the SheetSelectionChange
event but I doubt the event would execute if the outline changed, only
when the selection changes. Any ideas on how to capture the event when
the outline changes, would be much appreciated.
 
Hi
oh yes the world is getting smaller :-) But your name does not sound
German - one of the many foreigners working here in 'beautiful'
Frankfurt?

For your question: Maybe the following discussion will help you:
http://tinyurl.com/34vl3

--
Regards
Frank Kabel
Frankfurt, Germany

Kevin McCartney said:
Hi Frank,
Just looked at your location.... Frankfurt .... I too am in
Frankfurt, how the internet makes the world so small. Anyway do you
have any ideas how to obtain the current outline level, I'm only able
to obtain the outline level of the row at not the level that is being
shown, thanks anyway.
 
So using Rob Bovey's code modified:

Sub GetLargestOutline()
Dim lCurLevel As Long
Dim lMaxLevel As Long
Dim rngCell As Range
Dim szAddress As String
For Each rngCell In ActiveSheet.UsedRange.Resize(, 1)
lCurLevel = rngCell.EntireRow.OutlineLevel
If lCurLevel > lMaxLevel Then
If mycell.EntireRow.Visible then
lMaxLevel = lCurLevel
szAddress = rngCell.Address
End if
End If
Next rngCell
MsgBox "Largest visible outline level is " & CStr(lMaxLevel) _
& " beginning at cell " & szAddress
End Sub
 
Back
Top