Kinook Software Forums

Kinook Software Forums (
-   [VBP] Third Party Tools (
-   -   VBScript problem - MS Excel (

Kim 05-04-2003 11:08 AM

VBScript problem - MS Excel
I copied the following code from Microsoft and pasted it into a "Run Script" function in "Visual Build Professional" v5.0. When testing the script, Error at Line 4, Column 1 occur.

What am I doing wrong?

' VBScript source code

Dim ExcelSheet
Set ExcelSheet = CreateObject("Excel.Sheet")

' Make Excel visible through the Application object.
ExcelSheet.Application.Visible = True

' Place some text in the first cell of the sheet.
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1"

' Save the sheet.
ExcelSheet.SaveAs "C:\DOCS\TEST.XLS"

' Close Excel with the Quit method on the Application object.

' Release the object variable.
Set ExcelSheet = Nothing

kalons 05-08-2003 09:43 AM

This code also fails on by box if you put it in a .vbs file and execute via cscript/wscript, it's not specific to VisBuildPro. Sounds like the code is wrong or a required component isn't installed.

Kim 05-12-2003 05:40 AM

Then my question is: How do I write a script that would create a specifyed object?

All times are GMT -5. The time now is 06:46 AM.

Copyright 1999-2019 Kinook Software, Inc.