simple checkbox question

H

hatchmar

I really dont know much about VBA and/or macros and have what probably
is an extremly basic question. I wasnt sure how to word it so when
trying to search it i didnt really get any answers.

all I want to do is add several checkboxes to a spreadsheet, if the
user checks the box, I want the cell underneath it to be equal to 1,
or any number or letter, it doesnt matter. i just used 1 in an IF
formula but can change it if needed.

what i am doing is a timesheet so that users can keep track of how
many hours they worked each day, and if that day is a holiday, i want
them to be able to use the checkbox to indicate that this particular
day was a holiday. if they check the box, the cell under it returns a
1 and the correct amount of hours are added to the totals. there are
a few other things tied in to holidays but that is the basic idea
 
J

Jim Rech

You don't need any macros to do what you want..

-Right click any toolbar and pick the Forms toolbar.
-Click the check box control and draw it on top of the cell of your choice.
-You can position it pretty precisely with the arrow keys while it is
'selected'.
-Right click the check box and pick Format Control.
-In the Cell Link box enter the address of the underlying cell, e.g., D5,
and click OK.
-You can select the text in the check box and change it.

Now when you click the check box TRUE appears in the linked cell, and FALSE
when you uncheck it. So this isn't visible to the user:

-Select the cell.
-Format, Cells, Number tab.
-Select the Custom category at the end of the list.
-Type 3 semicolons in the Type box: ";;;" and OK.
 

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