ActiveX functionality is not automatically enabled when you start AutoCAD or VLISP, so your programs must ensure that ActiveX is loaded. The following function call accomplishes this:
(vl-load-com)
vl-load-com initializes the AutoLISP ActiveX environment. If ActiveX is already loaded, vl-load-com does nothing.
If ActiveX support is not yet available, executing