?
Solved

Object Create string of DLL classes

Posted on 2004-08-12
5
Medium Priority
?
345 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

770 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