ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autofilter.Selection - After Change Event??? (https://www.excelbanter.com/excel-programming/274466-autofilter-selection-after-change-event.html)

Paul M.[_2_]

Autofilter.Selection - After Change Event???
 
Hi Group [Soory for the re-post, somehow I initially
posted it to the general group????]

Does anyone know how to trap this event:

Autofilter.Selection Field:=6 ' Resets the autofilter
area.

I have a spreadsheet with the following activated.

Auto Filter - Row 2
Freeze Panes - Variable Range defined in a routine.
Scroll Area - Set as the UsedRange

When I set any of the auto filter criteria, the screen
locks when the cell where the freeze panes is set to is
hidden by the selection criteria change.

I have some simple "Quick Filters" as part of a custom
menu that specifies auto filter criteria on a basis, ie.
This Week, Next 14 days, Current Month. Where the code
sets the filter appropriatly on field 6 to the required
date range.

The problem is that if the user releases the autofilter
manually, the freeze panes are set to the first Non-
Hidden row. So the problem is that this may be the 800'th
row, not range("I3")

What I would like to be able to do, is trap the event
(after if possible) to re-set the freeze panes location
again.

I have tried the worksheet_change event, but I can't
specify the ByVal to Autofilter.Selection (This may not
even be possible) Am I even in the right worksheet event?

Does anyone have a solution to this problem? Or even a
stick to point me in thr right direction.

XLXP
WINXPPRO


Thanks

Paul M.
..




All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com