Your code worked fine for me (as-is).
Did you try the doEvents this way?
Option Explicit
Private Sub CommandButton1_Click()
menu1.Hide
DoEvents
menu2.Show
DoEvents
End Sub
Is this all your code (or just a snippet)?
If you have "application.screenupdating = false", then turn it back on after you
hide the form:
Option Explicit
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
'more code here
menu1.Hide
Application.ScreenUpdating = True
'application.screenupdating = false 'if you want
menu2.Show
DoEvents
End Sub
LB79 wrote:
Im still not getting this. My code is:
Private Sub CommandButton1_Click()
Menu1.Hide
Menu2.Show
DoEvents
End Sub
but the Menu1 is still showing in the background. Ive tried adding in
more then 1 DoEvents too but i cant seem to get it.
--
LB79
------------------------------------------------------------------------
LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156
View this thread: http://www.excelforum.com/showthread...hreadid=396483
--
Dave Peterson