Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 05-04-2003, 10:08 AM
Kim Kim is online now
Registered User
 
Join Date: 04-03-2003
Location: Norway
Posts: 26
Question VBScript problem - MS Excel

Hi,
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?

------CODE--------------------------------------------------------------------
' 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.
ExcelSheet.Application.Quit

' Release the object variable.
Set ExcelSheet = Nothing
Reply With Quote
  #2  
Old 05-08-2003, 08:43 AM
kalons kalons is online now
Registered User
 
Join Date: 03-22-2003
Posts: 13
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.
Reply With Quote
  #3  
Old 05-12-2003, 04:40 AM
Kim Kim is online now
Registered User
 
Join Date: 04-03-2003
Location: Norway
Posts: 26
Question

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:31 PM.


Copyright © 1999-2023 Kinook Software, Inc.