Jump to content

Can't open Excel personal.xls


Mucho
 Share

Recommended Posts

I'm running Excel 2003 in my Windows 7 with the following code

Global $FileName = "C:\Users\TomCar\AppData\Roaming\Microsoft\Excel\XLSTART\Personal.xls"

Global $oExcel = _ExcelBookopen($FileName)

$oExcelDoc = ObjCreate("Excel.Application")

$oExcelDoc.Visible = 1

$oExcel.Application.Run("All_Process")

But it can't be opened and I got the following error message:

D:\Stock Maintenance\Maintenance\InetGet & Convert SGX.au3 (76) : ==> Variable must be of type "Object".:

$oExcelDoc.Visible = 1

$oExcelDoc^ ERROR

I don't seem to get this problem using Excel XP in both WinXP and Win2000.

Link to comment
Share on other sites

I'm running Excel 2003 in my Windows 7 with the following code

Global $FileName = "C:\Users\TomCar\AppData\Roaming\Microsoft\Excel\XLSTART\Personal.xls"

Global $oExcel = _ExcelBookopen($FileName)

$oExcelDoc = ObjCreate("Excel.Application")

$oExcelDoc.Visible = 1

$oExcel.Application.Run("All_Process")

But it can't be opened and I got the following error message:

D:\Stock Maintenance\Maintenance\InetGet & Convert SGX.au3 (76) : ==> Variable must be of type "Object".:

$oExcelDoc.Visible = 1

$oExcelDoc^ ERROR

I don't seem to get this problem using Excel XP in both WinXP and Win2000.

I don't see why it would produce an error, but also don't see why you bother creating an additional Excel.Application object after _ExcelBookopen() already has. What's the point of $oExcelDoc when you already have $oExcel?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...