LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Autofilter or SpecialCells-related bug?

Greetings! Have run into an apparent glitch, would appreciate any ideas.

Briefly:
1. Selection.AutoFilter Field:=2, Criteria1:="Test" ' isolate rows of
interest using an autofilter
2. Range("B1").Offset(1).Select ' select first data cell below header cell
3. Range(Selection,
Selection.End(xlDown)).SpecialCells(xlCellTypeVisi ble).Select ' select
filtered cells
4. Set Config = Selection ' assign handle to the range collection

Up to here, everything is okay, sort of. If there is at least one visible
row in the filtered list, then Config.count accurately reflects the number
of autofiltered rows (cells, actually), and Config can be used as a
collection for subsequent processing.

HOWEVER, if there are no filtered cells (meaning no data row is visible in
the autofilter), then Config.count is not zero but rather is some large
number (less than total number of rows in data set).

Q1: What is it doing? Is this somehow self-inflicted?
Q2: As a work-around, what are options to identify what should be an empty
collection?

Office 2003 with all updates.

Thanks!
George


 
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
VB Question - AutoFilter related - 'Criteria1:' secion of my code Midnight[_2_] Excel Programming 6 August 13th 07 05:17 PM
How are these uses of SpecialCells different? M. Authement Excel Programming 0 May 28th 07 08:16 PM
SpecialCells mike Excel Programming 4 June 8th 06 01:50 AM
Specialcells Bruno Uato Charts and Charting in Excel 0 October 7th 05 07:42 PM
AutoFilter /specialcells Ron de Bruin Excel Programming 8 January 13th 04 03:45 PM


All times are GMT +1. The time now is 07:03 AM.

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"