Simulate Check Box

K

Karen

Using Excel 2003 - Is there any other way to simulate a check box in a cell?
I have a form that I want users to be able to check a box for a certain
request. I cannot use the check box because when I print it, it's too small.
Is there any other method to use?
Thanks to everyone who has helped me on this message board. Everyone is
ALWAYS so helpful.
Karen
 
B

Bernard Liengme

Why not use Data Validation so that only 'b' is allowed?
They still may enter 'B' but the data validation list should remind them a
'b' is needed
best wishes
 
R

Roger Govier

Hi Karen

You could use some event code - like double click.
The following code is based upon column D, change the column number to suit
your requirement.
On double click, the code checks to see if the cell is empty. If it is, it
formats the cell to Marlett and inserts an "a"
If the cell already contains a character, it deletes it and sets the font
back to Arial. Either change the font to your standard, or remove the line
altogether if you are happy for the font to remain as Marlett.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column <> 4 Then Exit Sub ' choose column Number
If Target.Count > 1 Then Exit Sub
If Target.Value = "" Then
Target.Font.Name = "Marlett"
Target = "a"
Else
Target.Font.Name = "Arial" ' set to your normal default font
Target = ""
End If
End Sub

Copy the Code above
Right click Sheet tab > View Code
Paste code into white pane that appears
Alt+F11 to return to Excel
 
D

Dave Peterson

(saved from a previous post)

Select the range that would have held the checkboxes.
Format|cells|number tab|custom category
In the "type:" box, put this:
alt-0252;alt-0252;alt-0252;alt-0252

But hit and hold the alt key while you're typing the 0252 from the numeric
keypad.

It should look something like this when you're done.
ü;ü;ü;ü
(umlaut over the lower case u separated by semicolons)

And format that range of cells as Wingdings (make it as large as you want)

Now, no matter what you type (spacebar, x, anyoldtextatall), you'll see a check
mark.

Hit the delete key on the keyboard to clear the cell.

If you have to use that "checkmark" in later formulas:
=if(a1="","no checkmark","Yes checkmark")
or
=counta(a1:a10)
to get the number of "checked" cells in A1:A10

Or you can filter by blanks and non-blanks.
 
K

Karen

Thank you so much for your help!
Karen

Bernard Liengme said:
Why not use Data Validation so that only 'b' is allowed?
They still may enter 'B' but the data validation list should remind them a
'b' is needed
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
 
K

Karen

Thank you so much for your help!
Karen

FSt1 said:
hi
format the cell to font Marlett then enter a lower case a or lower case b.
this will but a check mark in the cell and the font size and be increased or
decreased to suit.

regards
FSt1
 
K

Karen

Thank you so much for your help!
Karen

Roger Govier said:
Hi Karen

You could use some event code - like double click.
The following code is based upon column D, change the column number to suit
your requirement.
On double click, the code checks to see if the cell is empty. If it is, it
formats the cell to Marlett and inserts an "a"
If the cell already contains a character, it deletes it and sets the font
back to Arial. Either change the font to your standard, or remove the line
altogether if you are happy for the font to remain as Marlett.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column <> 4 Then Exit Sub ' choose column Number
If Target.Count > 1 Then Exit Sub
If Target.Value = "" Then
Target.Font.Name = "Marlett"
Target = "a"
Else
Target.Font.Name = "Arial" ' set to your normal default font
Target = ""
End If
End Sub

Copy the Code above
Right click Sheet tab > View Code
Paste code into white pane that appears
Alt+F11 to return to Excel
 
K

Karen

Thank you so much for your help!
Karen

edvwvw via OfficeKB.com said:
CHAR(252) in the wingdings font is a Tick
CHAR(251) is a cross

set the size to what ever you need

You could use data validation to create a list - the only challenge is that
in the list they both appear to be "ü"


edvwvw
 
K

Karen

Thank you so much for your help!
Karen

edvwvw via OfficeKB.com said:
CHAR(252) in the wingdings font is a Tick
CHAR(251) is a cross

set the size to what ever you need

You could use data validation to create a list - the only challenge is that
in the list they both appear to be "ü"


edvwvw
 
K

Karen

Just curious - Why do you have to type alt-0252 multiple times? It works,
just wondering why.
Karen
 
D

Dave Peterson

The number format string consists of 4 parts separated by a semicolon:

Positive;Negatives;Zero;Text

I would expect that you want to see that checkmark no matter what's typed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top