#1   Report Post  
Posted to microsoft.public.excel.programming
DB DB is offline
external usenet poster
 
Posts: 46
Default Add Sheets

I am able to add sheets to a workbook. However I would like the code to add
the new sheet after the selected sheet. What is the syntax?

Sheets.Add?????

Thanks!!

DB
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Add Sheets

activeworkbook.Worksheets.Add After:=Activesheet

--
Regards,
Tom Ogilvy


"DB" wrote in message
...
I am able to add sheets to a workbook. However I would like the code to

add
the new sheet after the selected sheet. What is the syntax?

Sheets.Add?????

Thanks!!

DB



  #3   Report Post  
Posted to microsoft.public.excel.programming
DB DB is offline
external usenet poster
 
Posts: 46
Default Add Sheets

Tom, in this same line of code can I indicate the sheet name as well?

Thanks!

DB

"Tom Ogilvy" wrote:

activeworkbook.Worksheets.Add After:=Activesheet

--
Regards,
Tom Ogilvy


"DB" wrote in message
...
I am able to add sheets to a workbook. However I would like the code to

add
the new sheet after the selected sheet. What is the syntax?

Sheets.Add?????

Thanks!!

DB




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Add Sheets

activeworkbook.Worksheets.Add(After:=Activesheet). Name = "NewSheet"

--
Regards,
Tom Ogilvy


"DB" wrote in message
...
Tom, in this same line of code can I indicate the sheet name as well?

Thanks!

DB

"Tom Ogilvy" wrote:

activeworkbook.Worksheets.Add After:=Activesheet

--
Regards,
Tom Ogilvy


"DB" wrote in message
...
I am able to add sheets to a workbook. However I would like the code

to
add
the new sheet after the selected sheet. What is the syntax?

Sheets.Add?????

Thanks!!

DB






  #5   Report Post  
Posted to microsoft.public.excel.programming
DB DB is offline
external usenet poster
 
Posts: 46
Default Add Sheets

Thank you so much for your help!!

DB

"Tom Ogilvy" wrote:

activeworkbook.Worksheets.Add(After:=Activesheet). Name = "NewSheet"

--
Regards,
Tom Ogilvy


"DB" wrote in message
...
Tom, in this same line of code can I indicate the sheet name as well?

Thanks!

DB

"Tom Ogilvy" wrote:

activeworkbook.Worksheets.Add After:=Activesheet

--
Regards,
Tom Ogilvy


"DB" wrote in message
...
I am able to add sheets to a workbook. However I would like the code

to
add
the new sheet after the selected sheet. What is the syntax?

Sheets.Add?????

Thanks!!

DB






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
How do I print sheets in Excel without blank sheets after page Peggy New Users to Excel 2 January 12th 08 11:10 AM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
In 3 active sheets in wkbk, determine& display the # of sheets that have data wrpalmer Excel Discussion (Misc queries) 1 November 4th 05 02:01 PM
Allocate Files to Sheets and Build a Master Sheet which Summarises All Sheets hanuman Excel Programming 0 September 9th 03 11:23 AM


All times are GMT +1. The time now is 08:38 AM.

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

About Us

"It's about Microsoft Excel"