views:

44

answers:

1

I am in the middle of (trying) to create a Class Library available for use in VB6/VBA. With some assistance received here I have now done the following:

  1. Created a Class Library Project in Visual Studio 2010 Express and put the code in a Class Module.
  2. Learned I needed this wonderful thing called an "Interface"... Made one of those:)
  3. I opened the project properties and went to "Assembly Information" and checked "Make COM Visible".
  4. I went to "Advanced Compile" options and targeted .Net 2.0 (it's very simple code).
  5. Removed all references expect for "System".
  6. Built the project (no warnings or errors) and copied the DLL out of the Bin folder into C:\Windows\System32\
  7. Ran RegAsm /tlb. Everything seemes just fine.

I popped open excel to run a quickie test and the TLB is available but I have two problems:

  • I can see both the class and the interface in the Object Browser/Intellisense.
  • When I try to create an instance of either object (Set obj = New MyObj)I get the error:

Automation error The system cannot find the file specified.

I can set a reference to the Object and the Intellisense can see it, I just get that error when I actually try to create the Object. Did I miss a step?

+2  A: 

7: Skip /tlb option of regasm it's a non-issue (not needed). Add /codebase

wqw