tags:

views:

40

answers:

3
+1  Q: 

Com DLL In VB6?

I have a class in an Excel file and my boss wants me to create that class into a COM DLL. I don't want to have him walk me through the entire process because he's quite busy.

Can any of you point me in the right direction and help me out with this?

+2  A: 

Create an ActiveX DLL project. This is a COM DLL.

Russ
Ok, that clears up a LOT. I'll look into it, thanks
Soo
+4  A: 
  1. Start Visual Basic.
  2. Create a new 'ActiveX DLL' project.
  3. Rename the 'Class1' class to the name of your class.
  4. Rename the project to something sensible.
  5. Paste the code from Excel into the class code window.
  6. Save the project and its files.
  7. Build the .dll (File -> Make...).

Depending on the code in your class (and its dependencies), you may need to add one or more references (Project -> References...) before it will build without errors.

Daniel Pratt
+1 For actually providing some details!
MarkJ
+ another 1 for the details:)
Oorang
+2  A: 

Work through the step-by-step guide from the VB6 user guide Creating An ActiveX DLL. It's pretty good. It goes through creating the project, building the DLL, and making a client project, and then it explains some underlying concepts and gotchas.

By the way ActiveX DLL just means COM DLL - marketing people called COM "ActiveX" in the late 1990s.

MarkJ
+1 For proving a link (with a heck of a lot more details)!
Daniel Pratt
+1 Good link...
Oorang