Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I set a specific excel cell to enter an 'X' when clicked
Another issue to finalize my format for building an automatted test form.
Can I identify a specific excel cell, where if 'clicked', will enter an 'X', if 'clicked again' will remove any existing 'x'? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I set a specific excel cell to enter an 'X' when clicked
I'd recommend using a double-click event rather than a single-click
(selection), since selection also fires when the cell is tabbed or arrowed into. Put this in your worksheet code module: Private Sub Worksheet_BeforeDoubleClick( _ ByVal Target As Excel.Range, Cancel As Boolean) With Target If Not Intersect(.Cells, Range("B1:B10")) Is Nothing Then Cancel = True If IsEmpty(.Value) Then .Value = "X" Else .ClearContents End If End If End With End Sub Change the range ("B1:B10") to suit. OTOH, you could also use a checkbox from the Forms toolbar and link it to a cell. In article , Test Creator <Test wrote: Another issue to finalize my format for building an automatted test form. Can I identify a specific excel cell, where if 'clicked', will enter an 'X', if 'clicked again' will remove any existing 'x'? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
enter time when shape is clicked | Excel Discussion (Misc queries) | |||
insert a row with enter on a specific cell | Excel Discussion (Misc queries) | |||
setup a spreadsheet that would enter an "X" when cell is clicked | Excel Worksheet Functions | |||
How to auto-enter date when cell is clicked? | Excel Discussion (Misc queries) | |||
How do I set the Enter key to go to a specific cell? | Excel Discussion (Misc queries) |