View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jan G. Thorstensen Jan G. Thorstensen is offline
external usenet poster
 
Posts: 8
Default Animating a Menu Bar

Thanks a lot, Jim Rech. That did the trick!

Jan



"Jim Rech" skrev i melding
...
This is better:

Sub MENU_Makro3()
Dim myBar As CommandBar
Dim i As Integer
Set myBar = CommandBars("My Menu")
With myBar
.Position = msoBarFloating
.Top = 245
DoEvents
For i = 35 To 600
.Left = i
DoEvents
Next i
End With
End Sub


--
Jim
"Jan G. Thorstensen" wrote in message
...
Hi. I want to animate a menu bar that is floating in Excel and flies in
from left to right.

This is the code where I attemped to do it, but the screen isn't updated
properly.
How can I have a better visual look here. Thanks for helping.

CODE SNIPPET:
------------------



Sub MENU_Makro3()
Dim myBar As CommandBar
Dim i As Integer
'
Set myBar = CommandBars("My Menu")
With myBar
.Position = msoBarFloating
.Top = 245
' Wants to animate the menu bar flying in from Left
For i = 35 To 600
.Left = i
Next i
End With
' Unfortuneately you can hardly se the Menu Bar moving. Why is that???
End Sub


Regards
Jan