Home |
Search |
Today's Posts |
#1
|
|||
|
|||
"Check Marking" a cell
Can I format (via Macro???) a cell so that if the user left clicks on the
cell a check mark appears without using the Control Toolbox. The cells with such format will only need to then be the totaled (via =counta(x:x). |
#2
|
|||
|
|||
There's no left click you can tie into. You could base it on selection (either
the mouse or the keyboard), but you could use rightclick for this: If that's ok, rightclick on the worksheet tab that should have this behavior. Select view code and paste this into that code window: Option Explicit Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("a:a")) Is Nothing Then Exit Sub End If With Target If IsEmpty(.Value) Then .Value = Chr(252) .Font.Name = "Wingdings" Else .ClearContents End If End With Cancel = True End Sub I used column A (range("a:a")), but you could specify any cells you wanted: me.range("a1:b3,d9:f12,c:c") for example. FVC wrote: Can I format (via Macro???) a cell so that if the user left clicks on the cell a check mark appears without using the Control Toolbox. The cells with such format will only need to then be the totaled (via =counta(x:x). -- Dave Peterson |
#3
|
|||
|
|||
?B?RlZD?= wrote
Can I format (via Macro???) a cell so that if the user left clicks on the cell a check mark appears without using the Control Toolbox. The cells with such format will only need to then be the totaled (via =counta(x:x). Something like this in a WorkSheet module: Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Target.Count 1 Then Exit Sub With Selection ..Value = Chr(252): .Font.Name = "Wingdings" End With End Sub -- David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell addressing using the content of another cell. | Excel Worksheet Functions | |||
Cell addressing using the content of another cell. | Excel Worksheet Functions | |||
How do I make a cell equal to another cells value and not it's fo. | Excel Worksheet Functions | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel | |||
GET.CELL | Excel Worksheet Functions |