excel range selection

Add-in Express™ Support Service
That's what is more important than anything else

excel range selection
error 
tomer st


Guest


Hi

when I perform this


        Dim workBook As Excel.Workbook
        workBook = ExcelApp.ActiveWorkbook
        MsgBox(workBook.Name)


its works fine, but when i perform this


        Dim range As Excel.Range
        range = ExcelApp.Selection
        range.Interior.Color = 15


I get this error



Detailed technical information follows:
---
(Inner Exception)
Date and Time: 21/01/2007 13:46:54
Machine Name: TOMER-ST
IP Address: 10.0.0.25
Current User: TOMER-ST\Tomer

Application Domain: c:\Documents and Settings\Tomer\Desktop\ExcelAddInTest\ExcelAddIn\bin\Debug\
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_32/AddinExpress.MSO.2005/2.4.1757.1__c20c070a1fc9a144/AddinExpress.MSO.2005.dll
Assembly Full Name: AddinExpress.MSO.2005, Version=2.4.1757.1, Culture=neutral, PublicKeyToken=c20c070a1fc9a144
Assembly Version: 2.4.1757.1
Assembly Build Date: 23/10/2004 00:00:02

Exception Source: Microsoft.Office.Interop.Excel
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
Exception Target Site: get_Selection

---- Stack Trace ----
Microsoft.Office.Interop.Excel._Application.get_Selection()
AddinExpress.MSO.2005.dll: N 00000 (0x0) JIT
ExcelAddIn.AddinModule.AdxCommandBarButton1_Click1(sender As Object)
AddinModule.vb: line 0094, col 09, IL 0007 (0x7)
AddinExpress.MSO.ADXCommandBarButton.OnButtonClick(button As ICommandBarButton, handled As Boolean&)
AddinExpress.MSO.2005.dll: N 0053 (0x35) IL



(Outer Exception)
Date and Time: 21/01/2007 13:46:54
Machine Name: TOMER-ST
IP Address: 10.0.0.25
Current User: TOMER-ST\Tomer

Application Domain: c:\Documents and Settings\Tomer\Desktop\ExcelAddInTest\ExcelAddIn\bin\Debug\
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_32/AddinExpress.MSO.2005/2.4.1757.1__c20c070a1fc9a144/AddinExpress.MSO.2005.dll
Assembly Full Name: AddinExpress.MSO.2005, Version=2.4.1757.1, Culture=neutral, PublicKeyToken=c20c070a1fc9a144
Assembly Version: 2.4.1757.1
Assembly Build Date: 23/10/2004 00:00:02

Exception Source:
Exception Type: AddinExpress.MSO.ADXExternalException
Exception Message: Error occured in the code of the add-in.
Exception Target Site: Object reference not set to an instance of an object.

---- Stack Trace ----



Posted 21 Jan, 2007 06:57:11 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Tomer.

It seems that the system registry stores the incorrect information about the Excel type library. What version of Office do you use? Have you ever reinstalled MS Office several times on your PC?


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 22 Jan, 2007 10:16:28 Top
tomer st


Guest


hi,

i'm using office 2003 (version 11.5612.6568)
i did install the office several times...
Posted 23 Jan, 2007 08:32:30 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Tomer, here is what I have found in the Internet:
http://support.microsoft.com/kb/320369
Posted 23 Jan, 2007 09:27:15 Top