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
 
N

Norman Jones

Hi Ger,

Try something like:
'=============>>
Private Sub CommandButton1_Click()
Me.Hide
UserForm1.Hide
Me.Show
End Sub
'<<=============
 
Joined
May 7, 2007
Messages
16
Reaction score
0
either set it's visible property to false or call it's hide -function...
frmModeless.visible = false
or
frmModeless.hide
 
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
 
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
 
G

Ger

Hi!
I've discovered that to visualize the NoModal form, the Modal form have
been unloaded in the right points of the code with

Unload frmModal

Bye
Ger
 

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