Check Box???

Derpeder

New Member
Joined
Oct 24, 2006
Messages
18
Can you make check boxes, so say I finish a task then I just click a box and it shows I completed it?

let me know
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
Hello, Derpeder
Welcome to the Board !!!!!

this would need some clarification
do you want to check if a (manual) task has been completed correctly ?
what would be the task ?
perhaps you don't need code ...

kind regards,
Erik
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Hi and welcome to the board

Don't use a checkbox. They're hard to work with if you have very many. Place this code in the WorkSheet module (Right Click on the Sheet Tab and choose view code)
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 
    If Target.Count > 1 Then Exit Sub 
    If Target.Column <> 1 Then Exit Sub 
    Target.Font.Name = "marlett" 
    If Target.Value = "" Then 
        Target.Value = "a" 
    Else: 
        Target.Value = "" 
    End If 
Cancel = True 
End Sub


This code will toggle any cell in Column A between an "a"(checkmark in marlett font) and blank when a cell is double clicked. You can use the value "a" in IF's and other formulas. Change column number to desired column.

HTH

lenze
 

Derpeder

New Member
Joined
Oct 24, 2006
Messages
18
Erik,

Thank you for the welcome. This site should be very helpful for me.

What I'm looking for is to just click a box to show that a task has been done. Yes for the most part it would be manual tasks. Its mainly just a convenience thing. Instead of say typing something in or highlighting. I'd like to be able to click a box to show its been completed.

Thanks.
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832

ADVERTISEMENT

to be sure: see lenzes reply :)

are we talking about tasks in Excel ?
you could apply conditional format to check if all cells in a range have been filled in
or
are you talking about a series of tasks like "getting some coffee, call the boss at 10AM, ..." ?
 

Derpeder

New Member
Joined
Oct 24, 2006
Messages
18
the second.

Get Coffee - Check
Do this - Check
Do that - Check
Eat lunch -

thats it


Plus how do you change the code in a particular cell?
 

Derpeder

New Member
Joined
Oct 24, 2006
Messages
18

ADVERTISEMENT

Lenze

I figured it out........thank you.

IS there a way I can change the code so it checks in a different column, or multiple columns?
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
lenzes option would be fine for the task
write your jobs in column B and paste the code in the sheetmodule
http://www.cpearson.com/excel/events.htm
TO INSTALL IN SHEET CODE WINDOW:
1. right click the "Name Tab" of sheet you want code to work in
2. Select "View Code" in drop down menu
3. VBE window will open ... paste code in and exit VBE


only a few minutes to check out :)

your last question is not clear to me
Plus how do you change the code in a particular cell?

greetings,
Erik
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
IS there a way I can change the code so it checks in a different column, or multiple columns?
read the code ! it's almost plain english
Code:
If Target.Column <> 1 Then Exit Sub
edit to suits
example
Code:
If Target.Column <> 2 And Target.Column <> 4 Then Exit Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,112,881
Messages
5,543,008
Members
410,583
Latest member
gazz57
Top