Hide Userform modeless

G

Ger

Hi,
I've two userform in the Excel VBA application.
The one is modal and the other modeless.
I should hide the modeless userform in some cases.
How can I do?

Thanks in advanced
Ger



*** Sent via Developersdex http://www.developersdex.com ***
 
N

Norman Jones

Hi Ger,

Try something like:
'=============>>
Private Sub CommandButton1_Click()
Me.Hide
UserForm1.Hide
Me.Show
End Sub
'<<=============
 
G

Ger

Thank you, thank you very much!!!! :)
It works OK

Then I use to visualize it again
=============>>
Private Sub CommandButton2_Click()
Me.Hide
UserForm1.Show 0
Me.Show
End Sub
'<<=============

Thank you again and again!!!!!
Ger

*** Sent via Developersdex http://www.developersdex.com ***
 
G

Ger

Sorry!!! But I've another problem!
In the first time I've already visualized my modal form, but when I use

=============>>
Me.Hide
UserForm1.Hide
Me.Show
'<<=============

the code is blocked in Me.Show and the following operation
are not executed.

Bye and thanks
Ger

*** Sent via Developersdex http://www.developersdex.com ***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top