Solved

how to dynamic refer to a DLL from VBA (PowerPoint)?

Posted on 2000-02-28
1
462 Views
Last Modified: 2010-05-18
Hi, experts,

I created a VB ActvieX DLL. It is used in PowerPoint by referencing to it.

Anyone can tell me how to create a dynamic referncing to the DLL from the PowerPoint VBA so as the application can be used in various platform such as Windows and WinNT? This dll is correctly registered in windows\system and winnt\system32. When I used the PowerPoint application in WinNT, it always indicated referencing error because it has already refered to Windos\system through Reference Dialog Box of VBA.

thanks a lot,
beginner
0
Comment
Question by:pxiao
1 Comment
 
LVL 8

Accepted Solution

by:
stefanx earned 50 total points
ID: 2566430
Well, you can do this in one of two ways. In Powerpoint's VBA Editor go to the menu Tools..References and select your ACtiveX DLL's classname from the list of available components. Otherwise, use code such as :

Dim Z As Object

Set Z = CreateObject("MyProject.ClassName")

where MyProject is the project name of the DLL and ClassName is the name of your class.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now