Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a check digit | Excel Programming | |||
Creating a Check Digit | Charts and Charting in Excel | |||
Creating a check mark box | Setting up and Configuration of Excel | |||
Help creating a check box on a form. | Excel Programming | |||
dynamically creating check boxes | Excel Programming |