How to get the value from Combobox

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

How to get the value from Combobox
 
Gunjan Singhai




Posts: 8
Joined: 2007-04-16
Hi friends,

We are using oleobject for excel using C#. We r able to place combobox on the excel worksheet and also able to assign the value to combobox, but now facing major problem in getting the user select value from the combobox.

Code:
To add the value:

SheetCBx.Object.GetType().InvokeMember("AddItem",System.Reflection.BindingFlags.InvokeMethod,null,SheetCBx.Object,new Object[]{strName});

Please suggest.

Thanks in advance.

Gunjan Singhai
Posted 16 Apr, 2007 04:57:32 Top
Sergey Grischenko


Add-in Express team


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

Do you use the Add-in Express product?


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 16 Apr, 2007 08:25:37 Top
Gunjan Singhai




Posts: 8
Joined: 2007-04-16
Yes, i use Add-In Express Standard.
The above mentioned error is solved.But now issue is, when i am installing the setup on other user desktop having Dot Net framework 1.1 SP1 with HOtfix(Tried with v2.0 too); getting below error in adxloader.log.Need urgent help since fighting from last 3 days!! :(

Add-in Express Loader Log File: 04/19/2007 18:38:50

Startup directory: C:\NW18OTCSetup\
------------------
18:38:50 364 Starting the add-in registration process.
18:38:50 364 Getting the default version of the .NET Framework.
18:38:50 364 Success (v1.1.4322).
18:38:50 364 Loading CLR: v1.1.4322.
18:38:50 364 The CLR (v1.1.4322) has been initialized successfully.
18:38:50 364 Creating a new domain setup.
18:38:50 364 Success.
18:38:50 364 Getting the add-in directory.
18:38:50 364 Success. The directory is 'C:\NW18OTCSetup\'
18:38:50 364 The 'shadow copy' is disabled.
18:38:50 364 Creating a new application domain.
18:38:51 364 Success.
18:38:51 364 Getting the base directory for the domain.
18:38:51 364 Success. The directory is 'C:\NW18OTCSetup\'.
18:38:51 364 Seaching for the Add-in Express core library.
18:38:51 364 Success. The 'AddinExpress.MSO.dll' file has been found.
18:38:51 364 Creating an instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
18:38:51 364 Assembly identity is 'AddinExpress.MSO'.
18:38:52 364 Success.
18:38:52 364 Unwrapping the instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
18:38:52 364 Success.
18:38:52 364 Creating an instance of the XML parser class.
18:38:52 364 Success.
18:38:52 364 Loading the manifest file (C:\NW18OTCSetup\adxloader.dll.manifest).
18:38:52 364 Success.
18:38:52 364 Getting the root element of the manifest (C:\NW18OTCSetup\adxloader.dll.manifest).
18:38:52 364 Success.
18:38:52 364 Getting the 'assemblyIdentity' element of the manifest (C:\NW18OTCSetup\adxloader.dll.manifest).
18:38:52 364 Success.
18:38:52 364 Seraching fo the 'name' attribute of the 'assemblyIdentity' element.
18:38:52 364 Success. The name is 'NW18OTC, PublicKeyToken=4436b7cf59b22674'.
18:38:52 364 Calling the managed procedure to register the 'NW18OTC, PublicKeyToken=4436b7cf59b22674' assembly.
18:38:52 964 Connecting to the application domain of the ADX loader.
18:38:52 964 Success.
18:38:52 964 Loading the 'NW18OTC, PublicKeyToken=4436b7cf59b22674' assembly.
18:38:52 964 Success.
18:38:52 964 Registering the 'NW18OTC, PublicKeyToken=4436b7cf59b22674' assembly (user).
18:38:53 964 Registering the 'NW18OTC.AddinModule' type.
18:38:53 964 Searching for static methods that contain the 'ComRegisterFunction' attribute.
18:38:53 964 Calling the 'AddinRegister' static method.
18:38:53 964 Error: The ADX Loader can't resolve the 'NW18OTC.resources, Version=1.0.2664.31452, Culture=en-US, PublicKeyToken=4436b7cf59b22674' assembly. Please check if the assembly exists in the application directory or in the GAC.
18:38:53 964 Error: The ADX Loader can't resolve the 'NW18OTC.resources, Version=1.0.2664.31452, Culture=en, PublicKeyToken=4436b7cf59b22674' assembly. Please check if the assembly exists in the application directory or in the GAC.
18:38:55 964 Error: Exception has been thrown by the target of an invocation.
18:38:55 964 Inner Exception: The type initializer for "NW18OTC.AddinModule" threw an exception.
18:38:55 964 The managed registration process is complete with HRESULT = 2.
18:38:55 364 The add-in registration process is complete with HRESULT = 2.


Posted 19 Apr, 2007 09:30:28 Top
Sergey Grischenko


Add-in Express team


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

As you can see in the error message, the loader can't find the 'NW18OTC.resources assembly in the add-in application directory. Please review the setup project and add all necessary assemblies.
Posted 20 Apr, 2007 09:34:56 Top