Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Form problem
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Form problem
No, not strictly. If you post your problem code we might be able to tell you
what is going wrong. Robin Hammond www.enhanceddatasystems.com "Jos Vens" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Closing a Form | Excel Discussion (Misc queries) | |||
HELP! - Closing form | Excel Programming | |||
HELP! - Closing form | Excel Programming | |||
closing form w/ Maco | Excel Programming | |||
need form to initialize without closing | Excel Programming |