Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to ungroup sheets programmatically? 1

Status
Not open for further replies.

EwS

Programmer
Dec 30, 2002
398
US
I'm adding several worksheets to my Excel spreadsheet. After the last one is added, I activate the first worksheet:
Code:
workbook.Worksheets.Select(1)
The problem with that is that when I open the .xls and make a change to that first worksheet (such as hide some rows), the change is being reflected on ALL the worksheets. To avoid this, after I open the .xls, I have to either select a different worksheet and go back to the first one or right click on one of the tabs and select "Ungroup Sheets" option . How can I do ungrouping programmatically? I tried to look for some property that I can set for each worksheet right after is has been added to the workbook, but can't find anything useful. I'm sure there's a way, I just don't have much experience in this area. I would appreciate your help.

 
It worked!!!!! Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top