Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Renaming an excel WorkSheet ina DTS ActiveX Script?

Status
Not open for further replies.

Lftsk

Programmer
Jul 11, 2002
25
US
Hello,

I have an DTS ActiveX script that deletes, creates and populates an excel worksheet in the same .xls file on a weekly basis. The problem I'm running into is renaming the spreadsheet after I add it into the Worksheets collection.

Any help is appreciated.

My code is below:

Set objExcel_Application = CreateObject("Excel.Application")



Set objExcel_WorkBook = objExcel_Application.Workbooks.ADD()


objExcel_WorkSheet = objExcel_Workbook.Worksheets.Add()

I think I need the line of code right here.

objExcel_WorkBook.SaveAs(strFileName)
objExcel_WorkBook.Close
 
I think you may need to look for an ActiveX script forum to ask this question. Or an Excel forum. Neither of these, unfortunately, seem to have much to do with SQL Programming, so you probably won't get much of an answer here.



Catadmin - MCDBA, MCSA
Remember, "Work" is a four letter word. And you know what your mother told you about using four letter words!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top