PDA

View Full Version : Programatically Add Reference



Larry99
09-18-2016, 12:09 PM
Hi,
New to the post.
How can I use vba to check the box(AnimatedGIF.DXAnimatedGIF) in available controls of the userform Additional Control.
I have registered DXAnimatedGif and can see in the available controls dialog box as AnimatedGIF.DXAnimatedGIF ( file location, C:\Windows\SysWOW64\DXAnimatedGIF.ocx), it's unchecked by default.
Is it possible to use code to check that box, that way users do not have to do it manually.
Thanks.

Paul_Hossler
09-18-2016, 04:40 PM
No error checking (like if it's already loaded, or the file is not there)





'https://msdn.microsoft.com/en-us/library/office/gg251584.aspx
ThisWorkbook.VBProject.References.AddFromFile ("c:\windows\syswow64\dxanimatedgof.ocx")