Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What I want to do is be able to click on a cell and a check mark appears and
if I click again it disappears. Is this possible? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
right click your sheet tab, view code and paste this in. It works for a1 - A10 so change to suit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("A1:A10")) Is Nothing Then If IsEmpty(Target) Then With Target .Font.Name = "marlett" .Value = "a" End With Else Target.Value = "" End If End If End Sub Mike "touchngo" wrote: What I want to do is be able to click on a cell and a check mark appears and if I click again it disappears. Is this possible? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The only problem with using SelectionChange is you have to move focus to
another cell and then back again to correct a mistaken entry. Perhaps the OP would consider double-clicking a cell to toggle the checkmark; that way, focus could remain in the same cell and double clicking a second time could reverse a mistaken entry. Using your code as a guide ('touchngo'... install it the same way as Mike told you for his code)... Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) If Not Intersect(Target, Range("A1:A10")) Is Nothing Then Cancel = True If IsEmpty(Target) Then With Target .Font.Name = "marlett" .Value = "a" End With Else Target.Value = "" End If End If End Sub -- Rick (MVP - Excel) "Mike H" wrote in message ... Hi, right click your sheet tab, view code and paste this in. It works for a1 - A10 so change to suit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("A1:A10")) Is Nothing Then If IsEmpty(Target) Then With Target .Font.Name = "marlett" .Value = "a" End With Else Target.Value = "" End If End If End Sub Mike "touchngo" wrote: What I want to do is be able to click on a cell and a check mark appears and if I click again it disappears. Is this possible? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Mike and Rick! Thats what I want. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Click on a cell and have check mark displayed in MS Excel | Excel Programming | |||
How can I add active tick mark/check mark boxes in excel? | Excel Discussion (Misc queries) | |||
Increase size of a Forms Check Box (click on to enter check mark) | Excel Discussion (Misc queries) | |||
Click on a cell to get a check mark then... | Excel Programming | |||
check box, so when you click on it it inserts a check mark into t. | Excel Discussion (Misc queries) |