If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > .net and excel???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-31-03, 13:07
mikezcg mikezcg is offline
Registered User
 
Join Date: Oct 2003
Posts: 311
.net and excel???

I get this error :
an unhandled exception of type 'system****ntime.interopservices.comexception' occurred in mscorlib.dll

Addtl info : Select method of range Class failed

When trying to excecute the most simple code:
Dim inv As Excel.Worksheet
Dim all As Excel.Range
inv = xl.Worksheets("Invoice")
'inv.Range("a1").Select()
all = inv.UsedRange
all.Select


WHAT IS UP WITH THIS DOG?

~M
Reply With Quote
  #2 (permalink)  
Old 12-31-03, 17:12
Xl-Dennis Xl-Dennis is offline
Registered User
 
Join Date: Dec 2003
Location: Östersund Sweden
Posts: 60
Mike,

Something along this one should at least give You an relevant error-message (at least something to start with):

Try
'Here You write the TryStatement
'Catch expression' As Exception
Console.WriteLine(" Error:" & f.Message)
Exit Sub
End Try

Does the error occur when You use VSTools or is it via the standard COM-connection?

Which version of XL are You working with?
Which version of office.dll in Net ?

Have faith although You working with Net
Dennis
__________________
Kind regards,
Dennis
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On