• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

To understand the Do While, loop

Status
Not open for further replies.
Code:
Set rg = Cells(10, 3)
rsReason.MoveFirst
Do Until rsReason.EOF
rg.Value = rsReason("reason")
Set rg = rg.Offset(1, 0)
rsReason.MoveNext
Loop
rsReason.MoveFirst
Set rg = Cells(reason_count + 24, 3)
Do Until rsReason.EOF
rg.Value = rsReason("reason")
rg.Font.Bold = False
Set rg = rg.Offset(1, 0)
rsReason.MoveNext
Loop
 
Do Until rsReason.EOF
means do what comes next until the End of the File referenced by rsReason is reached
It will keep doing whatever is after that until the Loop line
 
Do Until rsReason.EOF
means do what comes next until the End of the File referenced by rsReason is reached
It will keep doing whatever is after that until the Loop line

Please help me understand this in details, how the loop is working in the above example....Thanks
 
Status
Not open for further replies.
Back
Top