You just have to select one sheet.
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
"Claude" wrote in message
...
Hi all
What is the correct syntax to ungroup sheets in a workbook? I
want to make
sure that no sheets have been grouped by a previous user of the
files I'm
opening (as this causes problems with certain VBA procedures
I'm running on
the files). Can't find anything on this in the VBA help file...
Thxs!