Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enter a "checkmark" in an AutoFiltered cell
Hello --
Some columns in a data table a - 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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enter a "checkmark" in an AutoFiltered cell
Your code worked ok for me in a filtered worksheet in xl2002.
Are you sure your range("sendflags") is as large as you want? L Mehl wrote: Hello -- Some columns in a data table a - 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 -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enter a "checkmark" in an AutoFiltered cell
Dave --
The range is the correct size. It works now. Thanks for listening. Larry "Dave Peterson" wrote in message ... Your code worked ok for me in a filtered worksheet in xl2002. Are you sure your range("sendflags") is as large as you want? L Mehl wrote: Hello -- Some columns in a data table a - 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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Difficulty "countif"-ing number of "L1" or "L2" on an autofiltered | Excel Worksheet Functions | |||
Remove checkmark on "Update links to other documents" | Links and Linking in Excel | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How to enter "Withe" in an EXCEL cell? Excel stores only "With". | Excel Discussion (Misc queries) | |||
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! | Excel Discussion (Misc queries) |