Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Second Post - Please Help.
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00410269
Message ID:
00410295
Views:
17
It's not a FoxPro error, it is an OLE error and it means that excel cannot make the selection I want it to. The ideas I need are the ideas that people may have as to WHY this is occurring on an intermitant basis.

>Try to see what the error means.
>Use an error subroutine to use the Aerror() function. Then your code must look like
>
>Code:
>RELEASE ALL LIKE 'o*'
>
>oExcel= CREATEOBJECT("Excel.Application")
>lcFile = "s:\csc\admin\p&lfy01\WL_FY2001.xls"
>oBook = oExcel.WorkBooks.Open(lcFile,,,,"umai")
>
>oSheet=oBook.sheets(1)
>
>*!* When error occurs, it happens here! Like I said,
>*!* it doesn't happen all the time
>
>ON ERROR ExcelError()
>
>oSheet.RANGE("A4:T450").select
>
>ON ERROR
>
>oExcel.Application.DisplayAlerts = .F.
>oSheet.SaveAs("s:\csc\admin\impact\2001\wlt_temp.dbf",8)
>
>oExcel.quit()
>RELEASE oExcel
>
>
>Procedure ExcelError
>=AERROR(ErrorArray)
>FOR i=1 to 7
>?ErrorArray(i)
>endfor
>ENDPROC
Michael Helms

May the Schwartz be with you.<(©¿©)> -- Mel Brooks
"Someday, and that day may never come, you will be called upon to perform a service" -- Vito Corleone
"Live like there is no tomorrow, Dance like no one is watching, Love like you've never been hurt." -- Anonymous
"I'm thinking about joining the campaign for shorter tag lines." -- Me
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform