Oorang
Oorang

Reputation: 6780

Error When Instantiating an Object

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:

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?

Upvotes: 2

Views: 349

Answers (1)

wqw
wqw

Reputation: 11991

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

Upvotes: 2

Related Questions