Enter a "checkmark" in an AutoFiltered cell

L

L Mehl

Hello --

Some columns in a data table are:
- ItemType
- ItemName
- SelectThisRecordYN

The user wants to do the following:
- select the ItemType from a listbox (this is working),
- filter the data table on that ItemType, and
- change Yes/No values in the SelectThisRecordYN column for one or more
records.

The Yes/No values are indicated by a checkmark and a blank, respectively.

In the un-AutoFiltered table, the code at the bottom of this message (from
an earlier posting in this group) translates a double-click on the cell into
a checkmark/tickmark, and a second double-click to a blank (erases the
mark). The column is formatted with the Marlett font; in this font, an "a"
displays as a checkmark; "nothing" displays as a blank.

When I AutoFilter the table on the ItemType column, this double-clicking
code does not work.

Does anyone know what I am doing wrong?

Thanks for any help.

Larry Mehl

-----------------------
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As
Excel.Range, Cancel As Boolean)
' "toggle" the value of a cell in the named range "sendFlags"
' between True and False when the cell is double clicked
' (values switch between a checkmark and blank)
'format the column as
' bold
' font = Marlett; "a" --> a checkmark
' alignment - vertical - center
If Not Intersect(Target, Me.Range("sendFlags")) Is Nothing Then
Cancel = True
If Target.Value = "a" Then
Me.Range(Target.Address).Value = ""
Else
Me.Range(Target.Address).Value = "a"
End If
End If
End Sub
 
D

Dave Peterson

Your code worked ok for me in a filtered worksheet in xl2002.

Are you sure your range("sendflags") is as large as you want?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top