Thread
:
How do I set up a column in Excel as a check mark column?
View Single Post
#
5
Posted to microsoft.public.excel.misc
T. Valko
external usenet poster
Posts: 15,768
How do I set up a column in Excel as a check mark column?
Here's that code: (credit to Dave Peterson and Bob Phillips)
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myHeight As Double
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "a" Then
.Value = ""
Else
myHeight = .EntireRow.RowHeight
.Value = "a"
.Font.Name = "Marlett"
.EntireRow.RowHeight = myHeight
End If
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub
That's sheet code. Select the sheet that you want this to happen in. Right
click the sheet tab then select View code. Paste the code into the window
that opens. Adjust the range to suit. Right now it's set to A1:A100.
Biff
"B. Sherwin" <B.
wrote in message
...
Biff
Is there a chance i could get the macro code to place a check mark in a
cell
from a mouse click?
"T. Valko" wrote:
You could just use a "X". That'd be the easiest way to go about it.
If that isn't "sexy" enough......
Format the cells in question to use the Marlett font then enter a lower
case
"a" (without the quotes) in the cells where you want a checkmark.
If that's not "sexy" enough, you could use an event macro that inserts a
checkmark in a cell when selected. I think I have code to do that
somewhere
around here.
Biff
"wrsstevens" wrote in message
...
I am trying to figure out how to set up a column in Excel as a Check Box
Cell. Example: Column Heading: Paid Would like to be able to put a
check
mark under that columnas needed. Please help!
Reply With Quote
T. Valko
View Public Profile
Find all posts by T. Valko