Animating with slider

Hello to all!

I'm working to a vba macro to animate a cartesian robot.

In this example I go to edit a sketch with the use of a slider.

If you try it, you will see that its operation is not fluid.

Anyone have any ideas?

SolidworksApi macros