Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulty "countif"-ing number of "L1" or "L2" on an autofiltered pmdoherty Excel Worksheet Functions 4 February 6th 09 11:23 AM
Remove checkmark on "Update links to other documents" Per Baden Links and Linking in Excel 4 September 15th 08 01:32 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How to enter "Withe" in an EXCEL cell? Excel stores only "With". SeanMc98 Excel Discussion (Misc queries) 4 September 5th 07 10:52 PM
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM


All times are GMT +1. The time now is 09:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"