Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Form Control

I don't think so.

But you could just reassign the linked cells.

I used column A of the same row that held the checkbox.

Option Explicit
Sub testme()

Dim myCB As CheckBox

With Worksheets("Sheet1")
For Each myCB In .CheckBoxes
myCB.LinkedCell _
= .Cells(myCB.TopLeftCell.Row, "A").Address(external:=True)
Next myCB
End With

End Sub

And I used checkboxes from the Forms toolbar.

And if they were from the control toolbox toolbar:

Option Explicit
Sub testme2()

Dim OLEObj As OLEObject

With Worksheets("Sheet1")
For Each OLEObj In .OLEObjects
If TypeOf OLEObj.Object Is msforms.CheckBox Then
OLEObj.LinkedCell _
= .Cells(OLEObj.TopLeftCell.Row, "A") _
.Address(external:=True)
End If
Next OLEObj
End With

End Sub




Tammy wrote:

I am trying to use the checkbox form control in an Excel
spreadsheet where the checkbox value (true/false) is
linked to a cell. I can get the form control to work just
fine, however when I copy and paste the control to another
field, the cell link does not automatically change. I
have tried removing the $ from the cell link reference,
but the cell does not change. Since I have about 200 rows
which need this checkbox control, it would not be
efficient for me to manually change the cell reference in
each control property. Is there someway I can get the
cell reference to change when I copy/paste it?

Thanks in advance for any info you can provide.


--

Dave Peterson

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
Check Box (Form Control) Liz J[_2_] Excel Discussion (Misc queries) 1 August 13th 09 03:01 PM
Control on Form leerem Excel Discussion (Misc queries) 3 May 21st 09 05:49 PM
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
form control - check box irene c New Users to Excel 1 February 2nd 07 09:23 PM
How do I set up and use a group box form control? Grizz905 Excel Discussion (Misc queries) 1 January 20th 05 10:14 PM


All times are GMT +1. The time now is 02:59 PM.

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

About Us

"It's about Microsoft Excel"