Sign in to follow this  
Followers 0
Mucho

Can't open Excel personal.xls

2 posts in this topic

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.

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0