View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Stephenson Mark Stephenson is offline
external usenet poster
 
Posts: 3
Default Almost working using...

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)

Dim Selected
Set Selected = ActiveCell
Sheets("Notes").Select
Selection.AutoFilter Field:=1, Criteria1:=ActiveCell.Value, Operator:=xlAnd

End Sub

When I right click a cell, it filters using the value from the cell.
Unfortunately, this only works "properly" for the first value in sheet1. For
the other values it says they are filtered by, but no rows are returned and
when I go back to sheet1 to select another value then click, it keeps the
original filter.

Thanks,


Mark.