Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing a Form Mike Excel Discussion (Misc queries) 2 March 14th 06 01:09 PM
HELP! - Closing form Alex J Excel Programming 1 September 17th 04 01:37 AM
HELP! - Closing form Norman Jones Excel Programming 0 September 16th 04 03:21 AM
closing form w/ Maco jeffP Excel Programming 4 June 19th 04 10:29 PM
need form to initialize without closing bruce forster Excel Programming 2 April 21st 04 11:57 PM


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"