Hi all, I have some VBA code which calls a macro is vale of cell K9 is different than 1 (as below)
With ActiveSheet
Do Until .Range("K9").Value = 1
Application.Run "PasteLay"
Loop
End With
Exit Sub
The problem is, even when "K9" does = 1 - the macro "PasteLay" keeps on running
Macro PasteLay is below is this matters
Sub PasteLay()
Dim StartTime As Single
StartTime = Timer
Do While Timer - StartTime <= 20
DoEvents
Loop
Range("R7").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-10],Ticks!C[-16]:C[-13],4,FALSE)"
Range("S7").Select
ActiveCell.FormulaR1C1 = "=ROUND(R[11]C[-17]/(RC[-1]-1),2)"
End Sub
Bookmarks