View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jos Vens[_2_] Jos Vens[_2_] is offline
external usenet poster
 
Posts: 134
Default Closing Form problem

Hi Robin,

is it necessary to hide the form1 when opening form2? I do it on other
places without closing form1 and it works. I rather like to not hide form1
because then you have a flikkering-effect. It's better to open form2 on top
of form1 and then unload it when I don't need it anymore (form2 just asks
for a password)

I guess it has something to do with the focus on form1, because it's not
always happening.

Jos

"Robin Hammond" schreef in bericht
...
Jos,

Without your code it's difficult to be sure, but the structure should look
something like this:

In Form1's code

Sub cmdShowOtherForm_Click()
Me.Hide
frm2.Show
Me.Show
End Sub

Robin Hammond
www.enhanceddatasystems.com

"Jos Vens" wrote in message
...
Hi,

I have a form (let's say Form1) and it has a button that opens another
form on top (let's say From2).

When I close Form2 (by pressing the cancel key, which unloads Form2),
Form1 is also unloaded, which is not the purpose. Why is Form1 closed
to? The buttons to cancel the forms has different names, event-handling
is set off). I have debugged the code but there is no code that unloads
Form1.

How can I prevent that Form1 is closed too?

Thanks
Jos Vens