Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications

Post new topic   Reply to topic
Excel 97 automation with VB.NET
View previous topic :: View next topic  
Author Message
tesko
Newbie


Joined: 08 Jan 2004
Posts: 1

PostPosted: Jan 8th, 2004 10:19 AM    Post subject: Excel 97 automation with VB.NET Reply with quote

Hello,

I've been trying so many different methods for automating Excel 97 with VB.NET and I keep getting the same error.

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Reception.exe
Additional information: The server threw an exception.

This only happens with Excel 97, not Word 97. Here is the latest code I've tried.

Dim oExcel As Excel.Application
Dim oWorkbooks As Excel.Workbooks
Dim oSheets As Excel.Sheets
Dim oWB As Excel.Workbook
Dim oWS As Excel.Worksheet
Dim oRng1, oRng2 As Excel.Range

oExcel = New Excel.Application
oExcel.Visible = True

I've also tried using Excel.ApplicationClass instead, and I've tried using
the CreateObject function. Excel DOES become visible, but the exception is still thrown.

Any other suggestions would be appreciated.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic