Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Check for Grouping and Ungroup

I need to check for sheet grouping and if grouped ungroup in VB. I can't
find how to test or reset other than on the page. Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Check for Grouping and Ungroup

One way:

Public Sub try()
With ActiveWindow.SelectedSheets
If .Count 1 Then
MsgBox "Ungrouping sheets"
.Item(1).Select Replace:=True
End If
End With
End Sub


In article ,
Troubled User wrote:

I need to check for sheet grouping and if grouped ungroup in VB. I can't
find how to test or reset other than on the page. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Check for Grouping and Ungroup

How about just clearing the outline.
If Grouping is ON, it will be turned off.
If it's already OFF....nothing happens.

Worksheets("Sheet1").UsedRange.ClearOutline

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Troubled User" wrote:

I need to check for sheet grouping and if grouped ungroup in VB. I can't
find how to test or reset other than on the page. Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Check for Grouping and Ungroup

Ooops! You said *sheet* grouping....not outline grouping.
My apologies.

***********
Regards,
Ron

XL2002, WinXP


"Troubled User" wrote:

I need to check for sheet grouping and if grouped ungroup in VB. I can't
find how to test or reset other than on the page. Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Check for Grouping and Ungroup

Thanks. Worked great.

Any chance I could get you to look at my post entitled "Printing Assembled
Array Using Sheet Names"

Thanks.


"JE McGimpsey" wrote:

One way:

Public Sub try()
With ActiveWindow.SelectedSheets
If .Count 1 Then
MsgBox "Ungrouping sheets"
.Item(1).Select Replace:=True
End If
End With
End Sub


In article ,
Troubled User wrote:

I need to check for sheet grouping and if grouped ungroup in VB. I can't
find how to test or reset other than on the page. Thanks.


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
No grouping in pivot table (?ungroup?) Colin Excel Discussion (Misc queries) 3 January 27th 09 10:22 PM
How to ungroup ? moonhk Excel Programming 1 November 10th 06 03:35 AM
Help with Group/Ungroup deacs Excel Discussion (Misc queries) 3 January 30th 06 04:29 PM
Using a grouping of cells to check one cell against another... deucer Excel Worksheet Functions 1 January 11th 05 04:19 PM
Ungroup Sheets andym Excel Programming 2 October 5th 04 03:31 AM


All times are GMT +1. The time now is 05:18 PM.

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

About Us

"It's about Microsoft Excel"