Hi
I have many checkboxes in my worksheet. When I hide a certain row/column, The check boxes are not getting hidden. Is there a way of hiding the checkboxes embedded in the worksheet?
Thanks
Hi
I have many checkboxes in my worksheet. When I hide a certain row/column, The check boxes are not getting hidden. Is there a way of hiding the checkboxes embedded in the worksheet?
Thanks
You need to select the "Move and Size with Cells" option in the Format Control>Properties menu.
Effectively, when Excel hides a column it sets its width to zero, so if the Checkbox has this option set, its size will also be zero - thus hidden. And it restores to proper size when column is unhidden. Note that the checkbox sizes will also change if the column width is changed.
HTH, Dzinja
Thanks a lot for your reply.
My "Move and Size with cells" is greyed out. I am using checkboxes from Forms tool bar. Why is that the option is greyed out?
Thanks
Ram P
Hi Ram
RE: My "Move and Size with cells" is greyed out. I am using checkboxes from Forms tool bar. Why is that the option is greyed out?
Yes. You will need to use CheckBoxes from the "Control Toolbox".
Or, alternatively....
Have a Cell Ticked Upon Selection
This code must be placed in the Private Module of the Worksheet. To get there right click on the sheet name tab and select "View Code".
This code is an alternative to Checkboxes and can save a lot of space and is much easier to count the ticks! Just use the COUNTIF Function. This code works on only range A1:A10, but can be modified to suit. It could also be used in the Before Double Click event.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Target.Font.Name = "Marlett"
If Target = vbNullString Then
Target = "a"
Else
Target = vbNullString
End If
End If
End Sub
Display More
Dave,
You are right on target. I shall use the code you provided for this aspect.
Thanks a lot for your help.
Ram P:cheers:
Don’t have an account yet? Register yourself now and be a part of our community!