?
Solved

Object Create string of DLL classes

Posted on 2004-08-12
5
Medium Priority
?
349 Views
Last Modified: 2010-05-02
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 ?
0
Comment
Question by:TSYSTEMS_EPDMM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
Belthazor earned 1000 total points
ID: 11784303
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
 
LVL 26

Expert Comment

by:EDDYKT
ID: 11784337
Your progid is composed by


ProgramName.ClassName
0
 

Author Comment

by:TSYSTEMS_EPDMM
ID: 11784444
what is the program name in a dll ?

the name of the project file ?
0
 
LVL 3

Expert Comment

by:Belthazor
ID: 11784480
yes,the project name, but make sure you have registred your dll as descript in my previous post !
0
 

Author Comment

by:TSYSTEMS_EPDMM
ID: 11784589
ah it works. fine.

my problem was i didnt set the instancing to multiuse.

thx for ur answer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question