![]() |
Export Linkedcell
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 th check box's I have on a sheet. I have searched the web for weeks and hav found code that will supposed to do this but it never did. Here is the las 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 -- racerma ----------------------------------------------------------------------- racerman's Profile: http://www.excelforum.com/member.php...fo&userid=2698 View this thread: http://www.excelforum.com/showthread.php?threadid=40195 |
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 |
Export Linkedcell
Jim Cone Wrote: 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 '----------------- Jim you are the man!!!!! Thanks loads it works great -- racerma ----------------------------------------------------------------------- racerman's Profile: http://www.excelforum.com/member.php...fo&userid=2698 View this thread: http://www.excelforum.com/showthread.php?threadid=40195 |
All times are GMT +1. The time now is 07:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com