Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to run this code in Excel 2k so that I can count the number of
displayed rows when I display only Subtotal totals. Unfortunately, I get a run-time error 91 "Object variable or With block variable not set". With so little code, I can believe this is not working? Desperately seeking wisdom :{ Dim rng as Range set rng = ActiveSheet.Autofilter.Range.Columns(1).specialCel ls(xlVisible) msgbox rng.Count - 1 & " data rows are visible" |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Same response as Tuesday:
You haven't applied data|filter|autofilter to your worksheet -- look for those dropdown arrows and you'll see that they aren't there. GDCross wrote: I am trying to run this code in Excel 2k so that I can count the number of displayed rows when I display only Subtotal totals. Unfortunately, I get a run-time error 91 "Object variable or With block variable not set". With so little code, I can believe this is not working? Desperately seeking wisdom :{ Dim rng as Range set rng = ActiveSheet.Autofilter.Range.Columns(1).specialCel ls(xlVisible) msgbox rng.Count - 1 & " data rows are visible" -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rows not being displayed | Excel Discussion (Misc queries) | |||
Number of rows displayed in worksheet | Excel Discussion (Misc queries) | |||
Whats the function to count the total times a word is displayed | Excel Discussion (Misc queries) | |||
How To Count Rows Displayed After Applying AutoFilter | Excel Programming | |||
Displayed Collumns and Rows | Excel Programming |