|
-
Jun 21st, 2001, 12:03 PM
#1
Thread Starter
Member
SaveAs
Via vbscript, I am creating an Excel Worksheet and I want to be able to save the file when it is finished...This is my current code for doing do:
xlsheet.saveas "r:\Reports\" & DBase & ".xls"
This command works fine in a VB environment, but with VbScript, it generates an error...Does anyone know how I can save the xls file when I am finished editing it through script?
Thanks for any help!
-
Jun 21st, 2001, 01:16 PM
#2
Black Cat
What exactly is the Dbase refering to?
You may have to change it to:
VB Code:
xlsheet.saveas "r:\Reports\" & Cstr(DBase) & ".xls"
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 21st, 2001, 01:26 PM
#3
Thread Starter
Member
Dbase is just a refering to a string...I tried adding the "Cstr()" but it still doesn't work...The error given says "Object Required: saveas"
-
Jun 21st, 2001, 01:58 PM
#4
Black Cat
The methods of the Excel.Worksheet object should be the same in VBscript as they are in VB. I think the problem is with the xlsheet object earlier in your script. Would you mind showing a little more code?
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 21st, 2001, 02:27 PM
#5
Thread Starter
Member
Let me revise what I was asking...I just found out that you can't save a file through VbScript, so now I am wandering if I will be able to print the Excel sheet through script?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|