M
MikeM
I'd like to move an icon (named shIcon) from point A to B, and I can do so by
adding in a 1-second delay between moves. The way I've done it is:
With shIcon
dx = 0.1 * (xLoc - .Cells("pinX"))
dy = 0.1 * (yLoc - .Cells("pinY"))
For i = 1 To 10
dt1 = Now + 1 / 86400
' Next 3 lines create a 1-second delay (not the best way to do it, but it
works)
Do Until Now >= dt1
dx = dx
Loop
.Cells("pinX") = .Cells("pinX") + dx
.Cells("pinY") = .Cells("pinY") + dy
Next i
End With
However, I don't see the icon moving across the page, since it just shows
the first and last points. How can I make the move visible?
TIA,
Mike
adding in a 1-second delay between moves. The way I've done it is:
With shIcon
dx = 0.1 * (xLoc - .Cells("pinX"))
dy = 0.1 * (yLoc - .Cells("pinY"))
For i = 1 To 10
dt1 = Now + 1 / 86400
' Next 3 lines create a 1-second delay (not the best way to do it, but it
works)
Do Until Now >= dt1
dx = dx
Loop
.Cells("pinX") = .Cells("pinX") + dx
.Cells("pinY") = .Cells("pinY") + dy
Next i
End With
However, I don't see the icon moving across the page, since it just shows
the first and last points. How can I make the move visible?
TIA,
Mike