View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Robin Hammond[_2_] Robin Hammond[_2_] is offline
external usenet poster
 
Posts: 575
Default Closing Form problem

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