Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Add/Delete Worksheets and Reset Numbering

I add sheet2, sheet3, and sheet4 to the current workbook.
Then I delete these new sheets. If I execute the following code:

----------------------
Dim a As Integer

For a = 1 To 10
Sheets.Add
Next a
----------------------

The sheets don't start at Sheet2, like I thought they would. Does
someone have the code handy to "wipe out" the remberance of sheets
that existed but are now deleted.

Thanks
John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Add/Delete Worksheets and Reset Numbering

I don't think there is a straightfoward way to do this without looping
through the sheets, determining what you want the new sheet to be named, and
then renaming it.

--

Vasant

"John" wrote in message
m...
I add sheet2, sheet3, and sheet4 to the current workbook.
Then I delete these new sheets. If I execute the following code:

----------------------
Dim a As Integer

For a = 1 To 10
Sheets.Add
Next a
----------------------

The sheets don't start at Sheet2, like I thought they would. Does
someone have the code handy to "wipe out" the remberance of sheets
that existed but are now deleted.

Thanks
John



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
Numbering Worksheets jheison Excel Worksheet Functions 1 August 22nd 08 02:46 PM
Page numbering - grouped worksheets Charlotte Howard Excel Discussion (Misc queries) 0 November 5th 07 02:32 PM
Numbering Worksheets ErnDog Excel Discussion (Misc queries) 0 March 20th 06 08:01 PM
Copying and numbering worksheets lehbs Excel Discussion (Misc queries) 0 June 14th 05 06:28 PM
Loop thru files in DIR, delete worksheets & reset worksheet Name property?? Mike Taylor Excel Programming 1 October 24th 03 04:14 AM


All times are GMT +1. The time now is 06:59 PM.

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

About Us

"It's about Microsoft Excel"