View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Export Linkedcell

r,

The following code returns the linked cell address,
if the Checkboxes come from the Control Toolbox.

Jim Cone
San Francisco, USA

'-----------------
Sub FindOut()
Dim objCB As OLEObject
Dim strAddress As String
For Each objCB In ActiveSheet.OLEObjects
If TypeOf objCB.Object Is MSForms.CheckBox Then
strAddress = objCB.LinkedCell
MsgBox strAddress ' or add to a text file...
End If
Next
Set objCB = Nothing
End Sub
'-----------------


"racerman"

wrote in message


Hello all,
I am new to this list, and hope you all may help me here.
I am using Excel 2k and need to extract the Linked cell of all the
check box's I have on a sheet. I have searched the web for weeks
and have found code that will supposed to do this but it never did.
Here is the last code that I have looks like...

Sub FindOut()
Dim oCheck As Shape
Open "C:\CheckBoxInfo.Txt" For Output As #1

For Each oCheck In ActiveSheet.Shapes
If oCheck.Type = msoOLEControlObject Then
oCheck.Select
Print #1, Selection.LinkedCell
End If
Next

Close
End Sub

This error's out with "Object does not support this"
Does anyone have a way to do this?
Thanks in advance for any help here!--
racerman