LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Notification when Filter is selected

I think the closest you can do is to rely on the worksheet_calculate and a
formula in a cell in that worksheet:

Option Explicit
Private Sub Worksheet_Calculate()
MsgBox Me.AutoFilter.Range.Columns(1) _
.Cells.SpecialCells(xlCellTypeVisible).Cells.Count - 1
End Sub

But xl2002 didn't recalc when I just changed the filter.

So I threw:
=subtotal(3,a:a)
in an out of the way spot.

to force a recalc when I changed the filter

But if you're going to add the =subtotal() function, maybe you could just refer
to it directly in your code.




"BVHis <" wrote:

Being the newcomer to Excel VBA, I was wondering if there's a way of
knowing when the Autofilter has been changed, and if so, how??

What I'm trying to accomplish is this: I have a spreadsheet that is
essentially a BOM of extracted data from AutoCAD. This data consists
of a room numbers, room names, # of PCs, # of phones, etc... If the
user filters the list by, let's say the Room Number, I'd like to be
able to then count how many of each item are in that room. I know how
to get the visible rows but I don't know how to capture when the filter
has been changed.

Any help will be greatly appreciated.

Thanks in advance!

Matt W

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

 
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
how do i filter dependents already selected in drop down list fras_too Excel Discussion (Misc queries) 0 December 8th 09 01:33 PM
Data Filter on Selected rows and columns Mike Excel Discussion (Misc queries) 2 December 7th 09 08:36 PM
Using Advanced Filter: How do you MOVE the selected rows... ravif Excel Worksheet Functions 3 June 29th 09 10:25 PM
FILTER FUNCTION DOES NOT SHOW TOTAL RECORDS SELECTED MUSANDAI Excel Worksheet Functions 2 October 18th 07 05:04 PM
How do I obtain total for auto filter value selected ? FLo Excel Discussion (Misc queries) 1 November 22nd 05 03:08 PM


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

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

About Us

"It's about Microsoft Excel"