LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default do while loop problem

i have added a do while instruction to my macro

Sub loopthrough()
Dim C As Range
Dim MyRange As Range

Dim myRow As Integer
myRow = 1

Set MyRange = Range("t618:t1387")
For Each C In MyRange
Do Until myRow = 770
If C.Value = "Karlan-Gine" Then
If Range("AM1").Value 0 Then
C.Offset(0, 15).Value = "WBK0000"
C.Offset(0, 16).Value = C.Offset(0, 6)

End If

ActiveCell.Offset(1, 0).Select

myRow = myRow + 1
Loop
End Sub
-- and get this error message "Compile error.Loop without Do.

i have a Do statement at the beginning and don't see what is the problem.

thanks in advance
BDW
 
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
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
loop problem teepee[_3_] Excel Discussion (Misc queries) 3 December 31st 08 11:09 AM
Does loop function cause this problem? Eric Excel Worksheet Functions 3 July 1st 07 01:40 PM
Using a for loop Jeff Excel Discussion (Misc queries) 1 November 8th 06 09:27 PM
Find and Copy loop problem BillyJ Excel Discussion (Misc queries) 3 November 2nd 05 07:16 PM


All times are GMT +1. The time now is 09:47 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"