Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel 2003 on Windows XP.
If someone has a concise function to determine if an ActiveX control on a spreadsheet exists, could you please post example code? For example, ComboBox1? Thanks much in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please disregard this post. I located a function to do it.
Thanks to all who considered this issue and please excuse any inconvenience. "quartz" wrote: I am using Excel 2003 on Windows XP. If someone has a concise function to determine if an ActiveX control on a spreadsheet exists, could you please post example code? For example, ComboBox1? Thanks much in advance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveX controls are in the OLEObjects collection.
Dim obj as OleObject Dim cbx as MSForms.combobox bExits = False for each obj in Activesheet.OleObjects if typeof obj.Object is MSForms.Combobox then set cBx = obj.Object if lcase(cbx.name) = "combobox1" then bExists = True exit for end if end if Next -- Regards, Tom Ogilvy "quartz" wrote in message ... I am using Excel 2003 on Windows XP. If someone has a concise function to determine if an ActiveX control on a spreadsheet exists, could you please post example code? For example, ComboBox1? Thanks much in advance. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom. I prefer your method to the other one I had found.
"Tom Ogilvy" wrote: ActiveX controls are in the OLEObjects collection. Dim obj as OleObject Dim cbx as MSForms.combobox bExits = False for each obj in Activesheet.OleObjects if typeof obj.Object is MSForms.Combobox then set cBx = obj.Object if lcase(cbx.name) = "combobox1" then bExists = True exit for end if end if Next -- Regards, Tom Ogilvy "quartz" wrote in message ... I am using Excel 2003 on Windows XP. If someone has a concise function to determine if an ActiveX control on a spreadsheet exists, could you please post example code? For example, ComboBox1? Thanks much in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Form Control/ActiveX Control font difference | Excel Discussion (Misc queries) | |||
How to lock an ActiveX Control box on the spreadsheet? | Excel Worksheet Functions | |||
Control array - does it exist in VBA as in VB? | Excel Programming | |||
ActiveX control | Excel Programming | |||
Using the Microsoft Spreadsheet Control as ActiveX | Excel Programming |