LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Stop Loop

Hi,

I have the following VBA that deletes all empty rows within a range of
data. The only problem I am facing is that the loop keeps running,
hence it looks like it does not stop after row 4500.
Can someone tell me which command I have to define to stop the Looping
after row 4500?

Worksheets("Compiled").Activate
Range("A1:A4500").Select
Dim rng As Range
Set rng = Columns(1).Find("")
If Not rng Is Nothing Then
Do
rng.EntireRow.Delete
Set rng = Columns(1).Find("")
Loop While Not rng Is Nothing
End If



Thanks a lot for your help!

Rgds,
Robert

 
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
Recursive Loop -- How to Stop It? LarryP Excel Programming 6 June 28th 06 08:46 PM
Stop the loop when found. hfazal Excel Programming 1 February 16th 06 11:57 PM
Hot key to stop a LOOP joopdog[_3_] Excel Programming 5 February 9th 06 06:51 PM
how to stop a loop L775 Excel Programming 6 November 29th 04 08:37 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 06:52 AM.

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"