Archive of Mr Excel Message Board
I want to add some animation to a VBA UserForm. A simple animated logo or text in the top right corner is what I had in mind. I do not want the Form to be HTML based. Some info on how to approach this task or a sample project that will point me in the right direction would be valued.
Jack J

| Check out our Excel VBA Resources | ||||
![]() |
![]() |
![]() |
![]() |
![]() |
Hi mate, we might be able to help each other here
First your question.
I have some cool VBA code that rotates text well word art could be anthing i guess just tweat the script, let me know if this helps, but remember when scripts are running the Excel SS stops untill the scripts stops, so you can enter data, so non stop movement is impossible, thisis what i have tried for ages to solve and cant.
My Question to you "I do not want the Form to be HTML based" I want a English flag to blow in the wind on my exel sheets as background and as tiny gifs, but they only go in as picturesand the movements stops, As anyone im proud and so fly my nations flag on my work, all i mail out and all is free, i dream on day some one will mail my work an i shall see their nations flag along side, which i will geep on all future emails, one day all contrys will be represented i can only hope.
But how do i get arround this, sounds like you might have some ideas
Ill did that code out for you to try, i use it it works just fine lasts 6 seconds and moves 3 wordarts
look forwad to your ideas.
Take care
HTH
Jack in UK

Sub auto_open()
On Error Resume Next
For xyz = 1 To 1
Set OldCell = ActiveCell
ActiveSheet.Shapes("WordArt WB").Select
m = 1
For i = 1 To 10
Selection.ShapeRange.TextEffect.Tracking = m
m = m + 0.25
DoEvents
Next i
For i = 10 To 1 Step -1
Selection.ShapeRange.TextEffect.Tracking = m
m = m - 0.25
DoEvents
Next i
Selection.ShapeRange.TextEffect.Tracking = 1
ActiveSheet.Shapes("WordArt Tips").Select
For i = 1 To 8
Selection.ShapeRange.IncrementRotation 45#
DoEvents
Next i
OldCell.Select
Set OldCell = ActiveCell
ActiveSheet.Shapes("WordArt HC").Select
Selection.ShapeRange.TextEffect.PresetTextEffect = _
msoTextEffect14
m = 1
For i = 1 To 10
Selection.ShapeRange.TextEffect.Tracking = m
m = m + 0.65
DoEvents
Next i
For i = 10 To 1 Step -1
Selection.ShapeRange.TextEffect.Tracking = m
m = m - 0.65
DoEvents
Next i
Selection.ShapeRange.TextEffect.Tracking = 1
Next xyz
Range("Z50").Select
End Sub

And use it's animation feature eg you could
use a flag as you suggest.
Create the animation...then copy all pictures
....Align them on your sheet or userform
2) To animate it use either
a) application.ontime to make each picture
visible/invisible for a sec
b) make pictures visible/invisble in a loop
that also has Do Events
If you want examples I can send.
Ivan

Please forward me some examples. I do have PSP. Forward your examples to:
jackjoyce@listenup.co.uk
Many thanks

