Registration of ActiveX Components via VBA

M

Milan

Hello,

I use some ActiveX component which displays animated gifs on forms.
This component consists only of one dll file and runs without
problems. It has to be registrated both in Tools/ActiveX Controls and
in Options/References in VBA. Since the application will be
distributed to end users I do not know how to registrate the dll in
Tools/ActiveX Controls in every user´s Access using VBA.

Thank you for your help in advance.

Milan
 
D

Douglas J. Steele

You can Shell to regsvr32.exe, although it's better to use

Declare Function DllRegisterServer Lib "<yourlib.dll>" () As Long

since you can check the return code then.
 
M

Milan

Dear Douglas,

thank you very much for your answer, it works perfectly. Can you
please tell me what the meaning of the return value of this funcion
is? Is it the number of potential error? My return value is 0 so I
assume it means that there has been no error.

Many thanks,
Milan.
 
D

Douglas J. Steele

While I don't have a list of what error codes could be returned, returning 0
if there's no error is a usual convention.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top