A
April
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
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