LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Script Errors Out

Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("New.xls")
Set objWorkbook1 = objExcel.Workbooks.Open("Existing.xls")

objWorkbook.Worksheets(1).Copy before_
objWorkbook1.Worksheets(1)

objWorkbook1.Close SaveChanges = True
objWorkbook.Close

There is one worksheet in New.xls which I want to copy and add to
Exisiting.xls as the top tab. The above errors out and I have re-written so
many times I can't remember where I started. I also wanted to name the new
worksheet with the date but couldn't get syntax that would work.

This is a *.vbs text file that I want to place in the task scheduler.

Am using MS Office Pro 2003. I appreciate any assist. Thanks
--
Jeff C
Live Well .. Be Happy In All You Do
 
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
I need some VB script please rlee1999 Excel Discussion (Misc queries) 2 October 25th 06 05:46 PM
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
VB Script Krista Excel Worksheet Functions 4 May 20th 06 03:12 PM
Script Errors plainolguy Excel Discussion (Misc queries) 0 February 8th 06 01:42 AM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM


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