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
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
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, ..." ?
 
Upvote 0
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?
 
Upvote 0
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?
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top