Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 477
  • Last Modified:

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

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
pxiao
Asked:
pxiao
1 Solution
 
stefanxCommented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now