Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a Check Box within a Cell (

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Creating a Check Box within a Cell (

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" wrote in message
...
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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Creating a Check Box within a Cell (

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a check digit Patrick Excel Programming 1 February 20th 06 05:18 PM
Creating a Check Digit Ilan Charts and Charting in Excel 1 December 3rd 05 12:43 PM
Creating a check mark box MarthaSue Setting up and Configuration of Excel 18 April 28th 05 12:31 AM
Help creating a check box on a form. artemisia Excel Programming 8 May 25th 04 06:24 PM
dynamically creating check boxes Erin[_5_] Excel Programming 3 November 18th 03 09:52 PM


All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"