Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Displayed Collumns and Rows

I would like to find the actual rows displayed in the
activesheet. Any code examples would be greatly
appreciated.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Displayed Collumns and Rows

John,

Try these:

ActiveWindow.VisibleRange.Rows.Count
ActiveWindow.VisibleRange.Columns.Count

John

John Tripp wrote:

I would like to find the actual rows displayed in the
activesheet. Any code examples would be greatly
appreciated.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Displayed Collumns and Rows

Not sure if I understand you?

Excel 97 and up have 65536 rows

' rows in sheet
MsgBox Rows.Count

' this count the rows in the usedrange(a1:till the last cell)
' is not always correct
MsgBox ActiveSheet.UsedRange.Rows.Count

Or the CurrentRegion
MsgBox Range("A1").CurrentRegion.Rows.Count

Or do you mean visible rows??
MsgBox Columns("A:A").SpecialCells(xlCellTypeVisible).Cel ls.Count

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"John Tripp" wrote in message ...
I would like to find the actual rows displayed in the
activesheet. Any code examples would be greatly
appreciated.

Thanks



Reply
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
Rows not being displayed Barb Reinhardt Excel Discussion (Misc queries) 1 May 5th 09 09:55 PM
How do I sort collumns and leave out pictures in rows not used? TobyS. Excel Worksheet Functions 0 March 11th 08 10:16 PM
How do I invert an Excel table (collumns become rows)? songstarter Excel Worksheet Functions 1 January 2nd 08 07:01 PM
Switching from collumns to rows Shazza Excel Discussion (Misc queries) 3 February 20th 07 12:15 PM
Collumns and rows smintey Excel Discussion (Misc queries) 2 February 15th 05 05:10 PM


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

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

About Us

"It's about Microsoft Excel"