ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Create a check box for each row (https://www.excelbanter.com/excel-discussion-misc-queries/41817-create-check-box-each-row.html)

Nicholas

Create a check box for each row
 
I am trying to create an issues list in excel, and I want to add a check box
in the field as the issue is resolved.

David McRitchie

Hi Nicholas,

Install by rightclick on sheettab then view code then insert the following:

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Target.row = 1 Then Exit Sub 'row 1 s/b column titles
If Target.Column < 2 Then Exit Sub
If UCase(Target.Value) = "P" Then
Target.Value = ""
Else
Target.Value = "P"
End If
End Sub

Format the entire column with Symbol Font
then fix the first row formatting for normal (probably Arial) usage so you can see column headings.

If you don't like the style of the tick mark then see
http://www.mvps.org/dmcritchie/rexx/...bols.htm#ticks


More information on Event macros
http://www.mvps.org/dmcritchie/excel/event.htm

A doubleclick event is a much more positive action than merely
activating a cell.



---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Nicholas" wrote in message ...
I am trying to create an issues list in excel, and I want to add a check box
in the field as the issue is resolved.





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

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