Hi Tom
MsgBox ActiveSheet.UsedRange.Rows.Count
When you delete entire rows or right click on the selection and choose delete this is working.
selecting the cells and press the delete button is not working.
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
"Tom Ogilvy" wrote in message ...
or use
Activesheet.UsedRange
--
Regards,
Tom Ogilvy
"Ron de Bruin" wrote in message
...
Hi Tom
Generally not if you delete entire rows
If I delete entire rows with your example it will not reset the last cell
Only when I save the file
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
"Tom Ogilvy" wrote in message
...
Generally not if you delete entire rows. I don't discount the method
you
propose is more robust.
--
Regards,
Tom Ogilvy
"Ron de Bruin" wrote in message
...
Hi Al
Remember this is not always the last row with data
The last cell will be reset when you save the workbook.
Try to delete some data and run the sub again.
You see that it rember the last cell when you open the workbook
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
"Al Lind" wrote in message
...
Works great! Thanks Tom.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!