Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Place a check box at a particular cell
hi,
i'd like somebody to help me for writing a macro to generate a checkbox in a cell on click of a button.able to add a check box but it is not falling sequentially in the alternate rows..please somebody help me...i am new to excel.. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Place a check box at a particular cell
you could try this solution that I came up with a while back. This is a copy
of that post Another way is to use this technique of having a check column, and monitoring it with a worksheet selection change event. Add your code as needed. Rather than use a checkbox, I suggest just using a check column. So if we assume that the data is in A1:E100 (change to suit), clicking in column A will do what you want with this code. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.EnableEvents = False On Error GoTo sub_exit If Not Intersect(Target, Range("A1:A100")) Is Nothing Then With Target If .Value = "a" Then .Value = "" Else .Value = "a" .Font.Name = "Marlett" End If End With End If sub_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH RP "poor programmer" <poor wrote in message ... hi, i'd like somebody to help me for writing a macro to generate a checkbox in a cell on click of a button.able to add a check box but it is not falling sequentially in the alternate rows..please somebody help me...i am new to excel.. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Place a check box at a particular cell
Hi, Using the fine example noted above as a base, is there an extension t that code that would allow multiple marks with additional clicks? Fo example, clicking once yields an X. With that X in the box, the nex click would produce an O. Clicking again would give a third mark etc Of course, the produced mark would be dependent on font. Thanks Jo -- josephrowa ----------------------------------------------------------------------- josephrowan's Profile: http://www.excelforum.com/member.php...fo&userid=1440 View this thread: http://www.excelforum.com/showthread.php?threadid=26999 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
check or uncheck a check box based on a cell value | Excel Discussion (Misc queries) | |||
Copy and move check box (check boxes) with new cell link? | Excel Worksheet Functions | |||
Check if Conditional Format is True or False / Check cell Color | Excel Worksheet Functions | |||
How do I create a small box I can place a check mark in? | Excel Discussion (Misc queries) | |||
How can I place check mark | Excel Discussion (Misc queries) |