PC Review


Reply
Thread Tools Rate Thread

Creating a Check Box within a Cell (

 
 
Femi
Guest
Posts: n/a
 
      15th Jan 2009
Please pardon my ignorance on Programming (I am an accountant)
I need help creating a Check Box within a cell so when I double click on
that cell the check mark appears. I need to be able to copy the code to
other cells as well. Please be very detailed.

Thanks

Please Note:
I already tried inserting the Check Box thru the developer Control menu, but
it not locking into the cell I was told I would have to write a code through
Visual Basic to get it to do what I want.

 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      15th Jan 2009
Hi
You could select Marlett as a font in the cells you like to have a check
mark and by typing the letter "B" you will get a check marck. Since its a
font you can size it or colour it.
HTH
John
"Femi" <(E-Mail Removed)> wrote in message
news:7D823A01-F66E-468C-A656-(E-Mail Removed)...
> Please pardon my ignorance on Programming (I am an accountant)
> I need help creating a Check Box within a cell so when I double click on
> that cell the check mark appears. I need to be able to copy the code to
> other cells as well. Please be very detailed.
>
> Thanks
>
> Please Note:
> I already tried inserting the Check Box thru the developer Control menu,
> but
> it not locking into the cell I was told I would have to write a code
> through
> Visual Basic to get it to do what I want.
>


 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      16th Jan 2009
Expanding on John's Marlett idea, here is an event macro for the cell in
column A

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set t = Target
Set a = Range("A:A")
If Intersect(t, a) Is Nothing Then Exit Sub
Cancel = True
If t.Value = "" Then
t.Value = "a"
t.Font.Name = "Marlett"
Else
t.Value = ""
End If
End Sub


Because it is worksheet code, it is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the Excel window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm

--
Gary''s Student - gsnu200827


"Femi" wrote:

> Please pardon my ignorance on Programming (I am an accountant)
> I need help creating a Check Box within a cell so when I double click on
> that cell the check mark appears. I need to be able to copy the code to
> other cells as well. Please be very detailed.
>
> Thanks
>
> Please Note:
> I already tried inserting the Check Box thru the developer Control menu, but
> it not locking into the cell I was told I would have to write a code through
> Visual Basic to get it to do what I want.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
check or uncheck a check box based on a cell value RTKCPA Microsoft Excel Misc 1 3rd Feb 2010 03:11 PM
Copy and move check box (check boxes) with new cell link? Marty Microsoft Excel Worksheet Functions 1 20th Jan 2010 07:43 PM
Check if Conditional Format is True or False / Check cell Color =?Utf-8?B?S2V2aW4gTWNDYXJ0bmV5?= Microsoft Excel Worksheet Functions 5 29th Jun 2007 11:12 AM
Worksheet shakes like Rock n' Roll - how check the cell beside upon a singel cell change? Microsoft Excel Misc 1 4th May 2004 07:57 AM
command for using a check mark in a cell, not a check box =?Utf-8?B?aGFycmVsc29u?= Microsoft Access 1 16th Jan 2004 11:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:57 AM.