Thread: Unload vs Hide
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Unload vs Hide

hi.
the form is already showing as excel understands. the form is in memory just
hidden. so don't try to show it again. unhide it.
Private Sub CommandButton25_Click()
Headcount.Hide
MainMenu.Unhide
End Sub

regards
FSt1

"CV323" wrote:

I have 4 userforms

From the main menu - click on button1

Private Sub CommandButton1_Click()
Headcount.Show
MainMenu.Hide
End Sub

Works Fine!
====
from the Headcount form, if you click on the MainMenu button

Private Sub CommandButton25_Click()
Headcount.Hide
MainMenu.Show
End Sub

I get Run-time Error: '400'
"Form already displayed, can't show modally"

In Properties, ShowModal = True

I'm stuck - I've also tried Load and Unload and cannot find a way around this.

Thanks for any help!