MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Using the LinkedCell Property with Checkbox ActiveX Control


Posted by Tuc on May 23, 2001 10:09 AM

I am looping through the OLEObjects collection. If the object is a checkbox, I am examining the linkedcell property. Now I have a checkbox that I know has a value in the LinkedCell Property, however when VBA examines the property, it returns empty.
Now on this worksheet, if you examine the checkbox from the worksheet in break mode using the property window the name of the object is CheckBox34. In VBA code the name of the object is CheckBox15. This tells me that this control was previously copied and pasted on to the worksheet, but I know that the LinkedCell is populated. Any Ideas?


Posted by Dave Hawley on May 23, 2001 2:30 PM

Tuc

Here is one way


Sub FindOut()
Dim oCheck As Shape
For Each oCheck In ActiveSheet.Shapes
If oCheck.Type = msoOLEControlObject Then
oCheck.Select
MsgBox Selection.LinkedCell
End If
Next
End Sub

Dave

OzGrid Business Applications