I have created a dll in .NET that i use it in excel. End users who use the excel workbook need to register the dll when they first use the workbook. Sometimes, they fail to register the dll and launch the workbook. The workbook has a reference in it to the .dll. As soon as they try to do anything they get a compile error "User-defined type not defined". This is because:
Dim data
Set data = New unit.Units
and the "unit.dll" has not been registered to work with excel.
What i want to do is to catch and interrupt the compile error gracefully and tell the user to go back and re-register the dll before using the workbook. As it stands now they just see compile error - and well you can imagine when they are looking at the vb screen quite confused.
So i thought maybe i would create a type
but you can't have a type without members. And i'm not sure how this would work once someone registers the user-defined type by the same name.
So - any ideas how to solve this problem?
Thanks,
-lta
Bookmarks