Hello all!
I am trying to run an excel macro that's stored in a personal.xls file (in the XLSTART folder), in an automated script. The problem is, I can run the macro when I put the commands in manually, but when thescript is running, I get: Exception calling "Run" with "31" argument(s): "'Personal.XLS' could not be found.
Here's the code for the macro section:
$excel = new-object -comobject excel.application $workbook = $excel.workbooks.open("C:\test.xls") $worksheet = $workbook.worksheets.item(1) $excel.Run("Personal.XLS!FMT_PRICECHECKSTORE") $workbook.close() $excel.quit()Thanks in advance for any assistance!