ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Check Box (https://www.excelbanter.com/excel-discussion-misc-queries/20844-check-box.html)

tuxaby

Check Box
 
Does anyone know of a way to convert a cell to a check box? We would like to
convert the cell rather than using the active X controls on top of it.
Thanks.

Jason Morin

You could double-click the cell and "convert" it to a=20
checkbox:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
With ActiveCell
.Value =3D "=FC"
.Font.Name =3D "Wingdings"
.Borders(xlEdgeLeft).LineStyle =3D xlContinuous
.Borders(xlEdgeTop).LineStyle =3D xlContinuous
.Borders(xlEdgeBottom).LineStyle =3D xlContinuous
.Borders(xlEdgeRight).LineStyle =3D xlContinuous
.ColumnWidth =3D 2.57
End With
End Sub

---
To use, right-click on the sheet tab, go to View Code,=20
and paste in the code above. Press ALT+Q to exit.

HTH
Jason
Atlanta, GA

-----Original Message-----
Does anyone know of a way to convert a cell to a check=20

box? We would like to=20
convert the cell rather than using the active X controls=20

on top of it. =20
Thanks.
.



All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com