Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How to check for availability activeX control

Hello Group,



When distributing Excel projects with non-standard activeX controls I need
to make sure that they're installed before calling the control.

For example, the calendar control is a nice control, but it can be missed if
not available. I would like to check if the calendar is available, and only
then call it.



Does anybody know if this can be checked with Excel VBA, and how?



Thanks a lot.



Emile van Mierlo



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
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.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Emile van Mierlo" wrote in message
...
Hello Group,



When distributing Excel projects with non-standard activeX controls I need
to make sure that they're installed before calling the control.

For example, the calendar control is a nice control, but it can be missed

if
not available. I would like to check if the calendar is available, and

only
then call it.



Does anybody know if this can be checked with Excel VBA, and how?



Thanks a lot.



Emile van Mierlo





  #3   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
Resize the Check Box ActiveX Control Glockner Excel Worksheet Functions 1 November 1st 06 07:04 PM
Tab to an ActiveX control? Karin Excel Discussion (Misc queries) 0 July 6th 05 05:08 AM
ActiveX control jacob Excel Programming 1 November 22nd 03 06:03 PM
Cannot Delete an ActiveX Control Greg Wilson[_3_] Excel Programming 0 August 15th 03 04:27 AM


All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"