View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Emile van Mierlo Emile van Mierlo is offline
external usenet poster
 
Posts: 11
Default How to check for availability activeX control

Can you not just set an object variable for the object, and test that it
is
not Nothing.


Yes I can. I was thinking of checking the registry for it, but this works
just as well. Thanks for suggesting Bob.



Public Function hasCalendar() As Boolean
Dim obj As Object

On Error Resume Next
Set obj = CreateObject("MSCAL.Calendar")

hasCalendar = Not obj Is Nothing
Set obj = Nothing

End Function

Emile