PC Review


Reply
 
 
Member
Join Date: Jul 2007
Posts: 26
 
      5th Aug 2007
To All, I'm trying to get the following code to loop. Can anyone please help. I've tried all sorts of things. I either get no loop or an infinite loop. Thanks Geoffrey Barnard

Sub Sort0s()
Dim MyCounter
MyCounter = 1
Do Until MyCounter = 11
Cells.Find(What:="0", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
True, SearchFormat:=False).Activate
ActiveCell.Offset(0, -1).Select
Range(Selection, Selection.End(xlDown)).Select

Selection.sort Key1:=ActiveCell, Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

ActiveCell.Offset(0, 2).Select

MyCounter = MyCounter + 1
Loop

End Sub
 
Reply With Quote
 
 
 
 
Member
Join Date: Jul 2007
Posts: 26
 
      6th Aug 2007
To All Thanks, But I've solved my Problem.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Simple window application with a loop and a button to eventuallystop the loop Joe Cool Microsoft C# .NET 15 29th Jul 2009 08:40 PM
returning back to loop check condition without completing the loop ashish128 Microsoft Excel Programming 13 3rd Apr 2008 12:53 PM
loop through field names, then use to loop through records topopulate grid pmacdiddie@gmail.com Microsoft Access Form Coding 1 4th Jan 2008 01:13 PM
Advancing outer Loop Based on criteria of inner loop =?Utf-8?B?RXhjZWxNb25rZXk=?= Microsoft Excel Programming 1 15th Aug 2005 05:23 PM
Convert loop with Match function to avoid nested loop??? Kobayashi Microsoft Excel Programming 2 17th Mar 2004 06:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:39 AM.