Autofill for checkboxes
You can do somethhing like this with macros enabled and the macro
below.
call this sub on the click event of each check box.
this works for sheet1..but you can change the name to another in the
code if you like.
(Ps it works for checkboxes on sheet1 - an they all update on every
click of a check box)
' eg for :
sub checkbox1_click()
call test1
End sub
'------- Macro--------------------
Sub test1()
Dim ctl As OLEObject
''Dim sPath As String
i = 1
'sPath = "C:Documents and SettingsDickMy DocumentsTester"
For Each ctl In Sheet1.OLEObjects
If TypeName(ctl.Object) = "CheckBox" Then
If ctl.Object.Value = True Then
Sheet1.Cells(i, 1).Value = "TRUE"
Else
If ctl.Object.Value = False Then Sheet1.Cells(i,
1).Value = "FALSE"
End If
End If
i = i + 1
Next ctl
End sub
'------------------END---------------------------------------------
'Hope this helps
End Sub
john wrote:
I want the cell to change when the checkbox is changed and I have got that
working for one checkbox and the respective cell. Maybe Autofill isn't the
right word but I want to select the left-right-corner of the first cell with
the checkbox and drag it 176 cells further so that 176 checkboxes are made
and related to the cell they reside in.
"stevebriz" schreef in bericht
oups.com...
do you want the cell to change when the checkbox is change or vice
versa?
john wrote:
In my spreadsheet I need 177 checkboxes all linked to the cell they
reside
in. Is there a way to make one checkbox link it to the right cell and
then
autofill the other 176 checkboxes? The way I'm doing it now is not
working
as I have to make the link to the respective checkbox 176 times checkbox
for
checkbox.
thanks,
john
|