Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default add new worksheet after specific sheet

Excel 2003 on WinXL
I have a workbook with several named sheets.
I wish to programatically add a new named sheet after a named existing sheet
(lets call it MySheet) without Activating or selecting MySheet.
AddSheets After... doesnt seem to allow this.
--
donwb
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default add new worksheet after specific sheet

Worksheets.Add(After:=Worksheets("MySheet")).Name = "NewSheet"


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"donbowyer" wrote in message
...
Excel 2003 on WinXL
I have a workbook with several named sheets.
I wish to programatically add a new named sheet after a named existing
sheet
(lets call it MySheet) without Activating or selecting MySheet.
AddSheets After... doesnt seem to allow this.
--
donwb



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default add new worksheet after specific sheet

Thanks Bob - it was the syntax that evaded me
--
donwb


"Bob Phillips" wrote:

Worksheets.Add(After:=Worksheets("MySheet")).Name = "NewSheet"


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"donbowyer" wrote in message
...
Excel 2003 on WinXL
I have a workbook with several named sheets.
I wish to programatically add a new named sheet after a named existing
sheet
(lets call it MySheet) without Activating or selecting MySheet.
AddSheets After... doesnt seem to allow this.
--
donwb




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
Showing Specific Data from Master Sheet to Another Sheet Parker Jones New Users to Excel 1 July 10th 09 02:01 AM
Send data from userform to specific cell on specific sheet? JennLee Excel Programming 10 March 10th 07 02:55 AM
Navigate to specific cell on specific worksheet Bryan Excel Programming 2 April 13th 06 04:33 PM
Copy and pasting specific sheet data to a master worksheet simora Excel Programming 4 May 9th 05 05:30 AM
Entering Data in 1 Worksheet to appear in a specific format in Sheet 2 iomighty[_3_] Excel Programming 4 June 4th 04 11:49 PM


All times are GMT +1. The time now is 03:50 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"