i have been trying over and over to figure out what is going on with this, but i cant seem to get it
i have created a simple little script to save and excel document
the excel doc that I am opening is a templete and i want to save it with some date variables.
here is my code:
$oExcel = ObjCreate("Excel.Application") $oExcel.visible=1 $oExcel.WorkBooks.open("C:\Users\keith.000\Documents\Work Intergration\dailyUtilization.xltx") $oExcel.ActiveWorkBook.ActiveSheet.Cells(2,1).Value="test" msgbox(4096, "test", "C:\Users\keith.000\Documents\Work Intergration\dailyUtilization1"&@MON&@MDAY&".xlsx") $oExcel.ActiveWorkBook.SaveAs ("Filename:=C:\utilization\dailyUtilization1a.xlsm", "FileFormat:=xlOpenXMLWorkbookMacroEnabled", "CreateBackup:=False");, _FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ReadOnlyRecommended:=False, CreateBackup:=False)
when i get this to run i get an error at teh saveas function.
i have tried to use the excelcom_udf but i get the same error there too
the error is:
$oExcel.activeworkbook.saveas("filename:=C:\utilization\dailyutilization1a.xlsm", "fileformant:=xlopensmlworkbookmacroenabled", "createbackup:=false")^ERROR
error: the requested action with this object has failed.
can some one please shed some light here?
thanks
Dezypher





