Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Stopping a Macro

Mr. Paul,
I have also been in a tricky situation like this. I found a way out
to get the last row of the sheet, but under one condition. The sheet
should have a column of data in which every row has data, "Row number"
or "Sl. No." feilds, for example. You know the starting row of the
first data in this column (let it be A5). To find the last row, use
the code...

Range("A5").xldown.row

It is the same as pressing control and down arrow when you are at A5.
And it would be better to use the for each loop as given below

For each c in Range("A5:A" & Range("A5").xldown.row).cells

<Write your code

next



Understood?

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
Protect macro from stopping saman110 via OfficeKB.com Excel Discussion (Misc queries) 1 August 16th 07 08:22 PM
Stopping a Looping Macro Tony Excel Programming 2 October 28th 04 12:17 PM
stopping macro DPK Excel Programming 3 May 13th 04 06:50 AM
Stopping an animation macro Ray Kanner[_2_] Excel Programming 3 November 23rd 03 11:40 PM
My Macro keeps stopping?? Sh0t2bts Excel Programming 5 October 28th 03 03:08 PM


All times are GMT +1. The time now is 08:23 PM.

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"