
saving an excel file using VBS
I think it just stopped processing at that point, although it may have
been trying to call up the Save dialog. The problem is that you need to
use the _workbook_'s save method, and you actually want to do a SaveAs -
that's all in the Excel
VBA stuff.
The following would be the new save line:
xlApp.ActiveWorkbook.SaveAs("c:\test.xls")
Quote:
> hi
> i was able to automate an excel file, open it, but if i
> want to save like a different excel file using VBS, then
> my PC seems like it went on a cyclic process or endless
> loop. i checked the excel process and it was still running.
> can anybody give a short code how to save an excel file
> and close the excel process afterwards?
> i used the ff code
> Dim xlApp
> Set xlApp = CreateObject("Excel.Application")
> xlApp.Visible = True
> xlApp.Workbooks.Add
> xlApp.Range("a1").value = "this is a test"
> until here it was running fine, then i include
> xlApp.Save("c:\test.xls")
> then it went on an endless loop or cyclic process or
> standby mode
> hope you can help me..
> thanks and best regards
> archie
--
Please respond in the newsgroup so everyone may benefit.
http://dev.remotenetworktechnology.com
(email requests for support contract information welcomed)
----------
Microsoft's new UNIFIED Terminal Services Newsgroup: