Testing for and ungrouping grouped sheets

  • Thread starter Thread starter Conan Kelly
  • Start date Start date
C

Conan Kelly

Hello all,

(Using XL 2002)

How would I test for Grouped Sheets and then ungroup them if they are
grouped.

Thanks for any help anyone can provide,

Conan Kelly
 
Conan,

Try something like

If ActiveWindow.SelectedSheets.Count > 1 Then
ActiveWindow.SelectedSheets(1).Select
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)
 
One possibility:

If ActiveWindow.SelectedSheets.Count > 1 Then ActiveSheet.Select

Or just:

ActiveSheet.Select
________________________________________________________________________
 
Vasant,

Thank you for your help,

Conan




Vasant Nanavati said:
One possibility:

If ActiveWindow.SelectedSheets.Count > 1 Then ActiveSheet.Select

Or just:

ActiveSheet.Select
________________________________________________________________________
 
Chip,

Thank you for your help,

Conan




Chip Pearson said:
Conan,

Try something like

If ActiveWindow.SelectedSheets.Count > 1 Then
ActiveWindow.SelectedSheets(1).Select
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top