Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL 2010 file is not opening through Powerbuilder Oleobject. 1

Status
Not open for further replies.

vipinhcl

Programmer
Apr 21, 2010
30
0
0
US
Hi,

I had written code to open the excel application through powerbuilder using oleobject. My code was protecting a range of excel cells. It was working fine on excel 2007. Now my machine has excel 2010. Oleobject open function is giving error at open function. How can I correct that.

ole_excel = CREATE oleObject
li_return = ole_excel.ConnectToNewObject('excel.application')
If li_return < 0 then
Messagebox("Error","Unable to Connect Excel Application")
Return -1
End If
//To off the alert
ole_excel.Application.DisplayAlerts = "False"
ole_sheet = ole_excel.workbooks.open(docpath)

This open function is not working to open the excel 2010 file.
It is showing NULL object reference error.

Please suggest.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top