PC Review


Reply
Thread Tools Rate Thread

add new worksheet after specific sheet

 
 
donbowyer
Guest
Posts: n/a
 
      27th Dec 2007
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      27th Dec 2007
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" <(E-Mail Removed)> wrote in message
newsC6039DA-A807-438E-B8E4-(E-Mail Removed)...
> 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 With Quote
 
donbowyer
Guest
Posts: n/a
 
      27th Dec 2007
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" <(E-Mail Removed)> wrote in message
> newsC6039DA-A807-438E-B8E4-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export from access to specific worksheet and specific cell in exce Kevin Microsoft Access VBA Modules 4 26th Jan 2009 08:11 AM
Use macro to delete worksheet without specific name Eg:Sheet 1 Delight Microsoft Excel Programming 4 19th Nov 2008 01:01 AM
Send data from userform to specific cell on specific sheet? =?Utf-8?B?SmVubkxlZQ==?= Microsoft Excel Programming 10 10th Mar 2007 02:55 AM
Copy and pasting specific sheet data to a master worksheet simora Microsoft Excel Programming 4 9th May 2005 05:30 AM
Entering Data in 1 Worksheet to appear in a specific format in Sheet 2 iomighty Microsoft Excel Programming 4 4th Jun 2004 11:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:52 AM.