Is HRESULT a bug or an error?

  • Thread starter Thread starter KC
  • Start date Start date
K

KC

Is this

Exception from HRESULT: 0x800401A8

an error or a bug? I've been trying to build a chart in Excel through VB.net
(which isn't documented) so I'm running completely blind. What examples I
have found are from VB6 which doesn't convert well. When I do try a new
piece of code like:

oChart.Legend.Position = Excel.XlLegendPosition.xlLegendPositionBottom

(which sets the legend in a chart at the bottom of the chart) that is
syntactically correct in VB.net, but crashes at run-time, I'll get errors
like:

Exception from HRESULT: 0x800401A8.

Extremely frustrating.

Ken
 
Hi,

http://msdn.microsoft.com/library/d...en-us/odc_vsto2003_ta/html/odc_VSTExlchrt.asp

Ken
------------------
Is this

Exception from HRESULT: 0x800401A8

an error or a bug? I've been trying to build a chart in Excel through VB.net
(which isn't documented) so I'm running completely blind. What examples I
have found are from VB6 which doesn't convert well. When I do try a new
piece of code like:

oChart.Legend.Position = Excel.XlLegendPosition.xlLegendPositionBottom

(which sets the legend in a chart at the bottom of the chart) that is
syntactically correct in VB.net, but crashes at run-time, I'll get errors
like:

Exception from HRESULT: 0x800401A8.

Extremely frustrating.

Ken
 
Thanks.

I think I figured out the HRESULT. It's an error coming from Excel in my
case, but VB just can't *read* it and just shows the hexadecimal number for
it.

I also found another great semi-non-trivial explanation for inserting a
chart in Excel through VB.net for all who are interested:

http://www.vbcity.com/forums/topic.asp?tid=58714

Ken
 
Is this

Exception from HRESULT: 0x800401A8

an error or a bug? I've been trying to build a chart in Excel through VB.net
(which isn't documented) so I'm running completely blind. What examples I
have found are from VB6 which doesn't convert well. When I do try a new
piece of code like:

oChart.Legend.Position = Excel.XlLegendPosition.xlLegendPositionBottom

(which sets the legend in a chart at the bottom of the chart) that is
syntactically correct in VB.net, but crashes at run-time, I'll get errors
like:

Exception from HRESULT: 0x800401A8.

Extremely frustrating.

Sami

User submitted from AEWNET (http://www.aewnet.com/)
 
Guest said:
User submitted from AEWNET (http://www.aewnet.com/)

Your error code translates as
10-0-0-0000 0000 0100-0000 0001 1010 1000
10 = Warning
0 = Microsoft defined
0 = reserved
100 (4) = FACILITY_ITF (means that the error code is defined by the
interface -- which COM object is returning the error?)
0x0110101000 is your actual error
 
Back
Top