ranjith2523
Board Regular
- Joined
- Apr 29, 2014
- Messages
- 137
- Office Version
- 365
Hi Friends,
I wrote the simple code below to create a small animation (rotate a shape) and the shape is beautifully turning as expected.
But my concern is, I need the automation to automatically STOP after 10 seconds. Or at least it should stop after I click on a message box or something like that.
I tried my best and searched many things on Google but nothing worked out for me
I appreciate your help and support here.
Do
DoEvents
x = x - 5
ThisWorkbook.Sheets("Execute").Shapes.Range(Array("Freeform 4")).Rotation = x
ThisWorkbook.Sheets("Execute").Shapes.Range(Array("Freeform 5")).Rotation = x
ThisWorkbook.Sheets("Execute").Shapes.Range(Array("Freeform 6")).Rotation = x
Loop Until x = 217
Regards,
Ranjith
I wrote the simple code below to create a small animation (rotate a shape) and the shape is beautifully turning as expected.
But my concern is, I need the automation to automatically STOP after 10 seconds. Or at least it should stop after I click on a message box or something like that.
I tried my best and searched many things on Google but nothing worked out for me
I appreciate your help and support here.
Do
DoEvents
x = x - 5
ThisWorkbook.Sheets("Execute").Shapes.Range(Array("Freeform 4")).Rotation = x
ThisWorkbook.Sheets("Execute").Shapes.Range(Array("Freeform 5")).Rotation = x
ThisWorkbook.Sheets("Execute").Shapes.Range(Array("Freeform 6")).Rotation = x
Loop Until x = 217
Regards,
Ranjith