G
Guest
i want to have this macro sleeping 2s (during that time PXLAST will hopefully
get updated via DDE) until the condition is verified, can you help me out?
thanks in advance
Sub Macro1()
Dim i As Integer
For i = 1 To 1000
Do While Worksheets("sheet1").Range("pxlast").Value =
Worksheets("sheet1").Range("init").Offset(i - 1, 0).Value
Sleep 2000 / this wont work
Loop
Worksheets("sheet1").Range("pxlast").Copy
Worksheets("sheet1").Range("init").Offset(i, 0).PasteSpecial
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next
End Sub
get updated via DDE) until the condition is verified, can you help me out?
thanks in advance
Sub Macro1()
Dim i As Integer
For i = 1 To 1000
Do While Worksheets("sheet1").Range("pxlast").Value =
Worksheets("sheet1").Range("init").Offset(i - 1, 0).Value
Sleep 2000 / this wont work
Loop
Worksheets("sheet1").Range("pxlast").Copy
Worksheets("sheet1").Range("init").Offset(i, 0).PasteSpecial
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next
End Sub