Registration of ActiveX Components via VBA

  • Thread starter Thread starter Milan
  • Start date Start date
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
 
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.
 
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.
 
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.
 
Back
Top