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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exception error when saving from winform to excel

Status
Not open for further replies.

Plato2

Programmer
Dec 6, 2002
192
US
When I try to save from my vb.net form to excel I have the following exception error:

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

Additional information: Exception from HRESULT: 0x800A03EC.

This error is really confusing because when I save to excel
making: xlSheet.Cells(2, 2) = "This is column B row 2"
it works fine when I write the same statement in for loop
like:
for i=0 to 2
xlSheet.Cells(2, 2) = "This is column B row 2"
next ' in this case I receive exception error

How can I solve it
Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top