Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How many rows on a Worksheet
I am trying to find out how many rows there on a Worksheet
using VBA code. I am doing data extraction on XLS files I received from another company, and so I never know how many rows there can be on a work sheet. I have tried: Application.SendKeys "^{END}", True iRows = ActiveCell.Rows But his always returns 1. Any ideas? Thanks! Ed |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How many rows on a Worksheet
Try
iRows=cells.specialcells(xllastcell).row -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Ed Nelson" wrote in message ... I am trying to find out how many rows there on a Worksheet using VBA code. I am doing data extraction on XLS files I received from another company, and so I never know how many rows there can be on a work sheet. I have tried: Application.SendKeys "^{END}", True iRows = ActiveCell.Rows But his always returns 1. Any ideas? Thanks! Ed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy rows from one worksheet automatically, ignore rows that are b | Excel Worksheet Functions | |||
instering rows in one worksheet that reflect another worksheet | Excel Worksheet Functions | |||
insert rows in a worksheet that do not change adjoining rows | Excel Discussion (Misc queries) | |||
How do I insert blank rows between rows in completed worksheet? | Excel Discussion (Misc queries) | |||
Why does rngDataSource.Rows.Count = 65536 when worksheet Rows=95? | Excel Discussion (Misc queries) |