Hi,
I have a problem with the macro that I have done.
I would like it to stop when the value of the cell = "END" but it doens't work. The macro never stops running.
Could you please have a look at the problem and tell me what's wrong ? I assume that there is also a better solution that all the loops that I've done... ?
Thanks for your help,
Greg
Sub UpdateChecks()
'
' UpdateChecks Macro
' Macro recorded 12/12/2006 by
'
'
Sheets("AAA CHECKS").Select
VarName = Range("D6").Value
Range("B19").Select
Sheets("FULL").Select
Range("A3").Select
'Do Until ActiveCell.Value = "END"
Do Until ActiveCell.Value = VarName
ActiveCell.Offset(0, 1).Activate
Loop
Do Until ActiveCell.Value = "END"
Do Until ActiveCell.Value = "x"
ActiveCell.Offset(1, 0).Activate
Loop
VarDescription = ActiveCell.Offset(0, -3).Value
VarFrequency = ActiveCell.Offset(0, -2).Value
VarPeriod = ActiveCell.Offset(0, -1).Value
Sheets("AAA CHECKS").Select
ActiveCell.Value = VarDescription
ActiveCell.Offset(0, 1).Value = VarFrequency
ActiveCell.Offset(0, 2).Value = VarPeriod
ActiveCell.Offset(1, 0).Activate
Sheets("FULL").Select
ActiveCell.Offset(1, 0).Activate
Loop
End Sub
Bookmarks