LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Add New Worksheet through VBS COM Object

I have a problem when I try to add a worksheet through the EXCEL COM object
it adds Sheet4 in front of Sheet1, Sheet2, Sheet3. I want it to add the
sheet at the end of the sheets. The following code does not work from a .vbs
external script.
Excel Code:
ActiveWorkBook.Sheets.Add after:Worksheets(Worksheets.Count)

I have tried externally:
ExcelApp.WB.Sheets.Add (after:=Sheet3)

What to put in statement after Add?
 
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
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Charts and Charting in Excel 3 August 24th 06 07:26 PM
How do I get ONLY new info from 1 Worksheet to another automatical Elaine Excel Worksheet Functions 6 July 13th 06 05:45 PM
One worksheet to calulate different items simultaneously John Excel Worksheet Functions 4 November 28th 05 07:07 PM
Macro to search for and display data in another worksheet Mark H Excel Worksheet Functions 0 June 14th 05 12:40 PM
Copy from worksheet to another x times Union70 Excel Discussion (Misc queries) 0 March 7th 05 09:03 PM


All times are GMT +1. The time now is 02:56 PM.

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"