Object Create string of DLL classes

i like to create an object from a dll that i programmed in vb.

it should be done as

set object = Createobject("CLASSNAMESTRING_HERE")

with excel it can be done as

set object = Createobject("Excel.Application")

which string do i have to use in the dll and where do i enter this string ?
TSYSTEMS_EPDMMAsked:
Who is Participating?
 
BelthazorConnect With a Mentor Commented:
Hi, just did that yesterday:

1. In VB -> new project -> ActiveX DLL
2. Name the Project (lets say "MyLibrary")
3. Name the ClassModule (lets say "Functions") and set Instancing to MultiUse
4. Write your functions, Public Functions will be accessible (lets say Public MyFunction(Param))
5. Compile and Save your DLL (lets say to "C:\MyLibrary.dll")
6. Goto Start->Run-> "regsvr32 C:\MyLibrary.dll" (the DLL is registred in Windows no, to unregister run "regsvr32 -u C:\MyLibrary.dll")
7. Use it like:
Dim Object
Set Object = CreateObject("MyLibrary.Functions")
Object.MyFunction(Param)

Belthazor
0
 
EDDYKTCommented:
Your progid is composed by


ProgramName.ClassName
0
 
TSYSTEMS_EPDMMAuthor Commented:
what is the program name in a dll ?

the name of the project file ?
0
 
BelthazorCommented:
yes,the project name, but make sure you have registred your dll as descript in my previous post !
0
 
TSYSTEMS_EPDMMAuthor Commented:
ah it works. fine.

my problem was i didnt set the instancing to multiuse.

thx for ur answer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.