I have the following code that is supposed to stop running when the active cell contains the text "Stop", but it doesn't stop. I have several macros designed to stop in the exact same way and the do stop, but this one doesn't. Can anyone tell me why it keeps going?
Here is the code:
Sub newhires()
'
' newhires Macro
'
'
Range("ac2").Select
Do Until ActiveCell = "Stop"
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(0, -13).Select
Range(Selection, ActiveCell.Offset(0, 5)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 13).Select
Loop
End Sub
Here is the code:
Sub newhires()
'
' newhires Macro
'
'
Range("ac2").Select
Do Until ActiveCell = "Stop"
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(0, -13).Select
Range(Selection, ActiveCell.Offset(0, 5)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 13).Select
Loop
End Sub