Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using a typeconverter in Excel PIA assembly

I would like to use a TypeCoverter to regionalise output for enums in an
assembly that is a PIA loaded into Excel.

I can run this and it works on an assembly in a test project I created with
an explicitly referenceed assembly, however when running a project that has
been built as an Excel PIA. If I try:
<System.ComponentModel.TypeConverter(GetType(Resou rceEnumConverter)) _
public enum MyEnum
ItemA
ItemB
end enum

and in code
myE = MyEnum.ItemA
Dim converter As System.ComponentModel.TypeConverter =
TypeDescriptor.GetConverter(myE)

In the immidiate window
? converter.ToString() goves
"System.ComponentModel.EnumConverter"

whereas in my other project (also a strongly signed assembly, but referenced
directly from a newly created stub windows form project), I get

? converter.ToString
"ClassLibrary1.LocalizedEnumConverter"

so it look like the LocalizedEnumConverter is not being bound to the enum -
any ideas? Is this because of the way Excel loads the assembly, and is there
a way arounfd this?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem linking assembly to existing Excel file Brian Wolfe Excel Programming 0 March 7th 07 11:51 PM
How to Reference a .Net Assembly from within VBA? TCook Excel Programming 2 October 31st 06 11:52 AM
How to create a script to trust an assembly - Excel 2003 - Office System Project with C# John Yung Excel Programming 8 October 6th 05 02:28 PM
Excel Macro/Assembly i created in C# wont load on End user compute Jose Jarabo Excel Programming 0 September 29th 04 04:43 PM
TypeConverter Excel-Automation problem Markus Excel Programming 0 August 23rd 04 11:17 AM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"