#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Queryclose


I have the following code:

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
Unload AddTitle
AddOrFind.Show
End If
End Sub

What I'm trying to accomplish is when I click the red X (close) in the upper
right corner of AddTitle I want the AddTitle userform to close and the
AddOrFind userform to open. Instead what's happening is the AddOrFind
userform is showing on top of the AddTitle userform. How do I get the
AddTitle userform disappear?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Queryclose


see below

"Bishop" wrote in message
...
I have the following code:

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True

Me.Hide
'' Unload AddTitle 'rem out
AddOrFind.Show
End If
End Sub

What I'm trying to accomplish is when I click the red X (close) in the
upper
right corner of AddTitle I want the AddTitle userform to close and the
AddOrFind userform to open. Instead what's happening is the AddOrFind
userform is showing on top of the AddTitle userform. How do I get the
AddTitle userform disappear?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Queryclose


Ok, that gets rid of the AddTitle userform but if I pull it up again the
QueryClose function doesn't even respond. Clicking the red X does nothing.

Here's how this flows so you have a better idea. When the spreadsheet opens
the AddOrFind userform shows. AddOrFind has 3 buttons one of which calls the
AddTitle userform. If I call up the AddTitle userform and click the red X
AddTitle goes away (Me.Hide) and AddOrFind pops back up. If I choose
AddTitle again the userform shows but the QueryClose function no longer
responds.

"Patrick Molloy" wrote:

see below

"Bishop" wrote in message
...
I have the following code:

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True

Me.Hide
'' Unload AddTitle 'rem out
AddOrFind.Show
End If
End Sub

What I'm trying to accomplish is when I click the red X (close) in the
upper
right corner of AddTitle I want the AddTitle userform to close and the
AddOrFind userform to open. Instead what's happening is the AddOrFind
userform is showing on top of the AddTitle userform. How do I get the
AddTitle userform disappear?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Queryclose


Thanks for the _Click info. I kept wondering why I couldn't use my mouse to
select those. However, I'm a little fuzzy on "just paste it in." What am I
pasting where?

"Patrick Molloy" wrote:

I didn't include the query close to keep the code for the keypress events
clean.
just paste it in

you also will need

Private Sub AddButton_Click()
AddTitle.Show
End Sub

and ditto for the find and summary buttons

I could not replicate your issue though. I attached my demo file

"Bishop" wrote in message
...
Ok, that gets rid of the AddTitle userform but if I pull it up again the
QueryClose function doesn't even respond. Clicking the red X does
nothing.

Here's how this flows so you have a better idea. When the spreadsheet
opens
the AddOrFind userform shows. AddOrFind has 3 buttons one of which calls
the
AddTitle userform. If I call up the AddTitle userform and click the red X
AddTitle goes away (Me.Hide) and AddOrFind pops back up. If I choose
AddTitle again the userform shows but the QueryClose function no longer
responds.

"Patrick Molloy" wrote:

see below

"Bishop" wrote in message
...
I have the following code:

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
Me.Hide
'' Unload AddTitle 'rem out
AddOrFind.Show
End If
End Sub

What I'm trying to accomplish is when I click the red X (close) in the
upper
right corner of AddTitle I want the AddTitle userform to close and the
AddOrFind userform to open. Instead what's happening is the AddOrFind
userform is showing on top of the AddTitle userform. How do I get the
AddTitle userform disappear?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Queryclose


I never had this routine in my demo

Private Sub UserForm_QueryClose
....
End Sub


"Bishop" wrote in message
...
Thanks for the _Click info. I kept wondering why I couldn't use my mouse
to
select those. However, I'm a little fuzzy on "just paste it in." What am
I
pasting where?

"Patrick Molloy" wrote:

I didn't include the query close to keep the code for the keypress events
clean.
just paste it in

you also will need

Private Sub AddButton_Click()
AddTitle.Show
End Sub

and ditto for the find and summary buttons

I could not replicate your issue though. I attached my demo file

"Bishop" wrote in message
...
Ok, that gets rid of the AddTitle userform but if I pull it up again
the
QueryClose function doesn't even respond. Clicking the red X does
nothing.

Here's how this flows so you have a better idea. When the spreadsheet
opens
the AddOrFind userform shows. AddOrFind has 3 buttons one of which
calls
the
AddTitle userform. If I call up the AddTitle userform and click the
red X
AddTitle goes away (Me.Hide) and AddOrFind pops back up. If I choose
AddTitle again the userform shows but the QueryClose function no longer
responds.

"Patrick Molloy" wrote:

see below

"Bishop" wrote in message
...
I have the following code:

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
Me.Hide
'' Unload AddTitle 'rem out
AddOrFind.Show
End If
End Sub

What I'm trying to accomplish is when I click the red X (close) in
the
upper
right corner of AddTitle I want the AddTitle userform to close and
the
AddOrFind userform to open. Instead what's happening is the
AddOrFind
userform is showing on top of the AddTitle userform. How do I get
the
AddTitle userform disappear?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Queryclose


I'm not seeing this demo you're talking about. Is it an attachment? Where
do I locate it?

"Patrick Molloy" wrote:

I never had this routine in my demo

Private Sub UserForm_QueryClose
....
End Sub


"Bishop" wrote in message
...
Thanks for the _Click info. I kept wondering why I couldn't use my mouse
to
select those. However, I'm a little fuzzy on "just paste it in." What am
I
pasting where?

"Patrick Molloy" wrote:

I didn't include the query close to keep the code for the keypress events
clean.
just paste it in

you also will need

Private Sub AddButton_Click()
AddTitle.Show
End Sub

and ditto for the find and summary buttons

I could not replicate your issue though. I attached my demo file

"Bishop" wrote in message
...
Ok, that gets rid of the AddTitle userform but if I pull it up again
the
QueryClose function doesn't even respond. Clicking the red X does
nothing.

Here's how this flows so you have a better idea. When the spreadsheet
opens
the AddOrFind userform shows. AddOrFind has 3 buttons one of which
calls
the
AddTitle userform. If I call up the AddTitle userform and click the
red X
AddTitle goes away (Me.Hide) and AddOrFind pops back up. If I choose
AddTitle again the userform shows but the QueryClose function no longer
responds.

"Patrick Molloy" wrote:

see below

"Bishop" wrote in message
...
I have the following code:

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
Me.Hide
'' Unload AddTitle 'rem out
AddOrFind.Show
End If
End Sub

What I'm trying to accomplish is when I click the red X (close) in
the
upper
right corner of AddTitle I want the AddTitle userform to close and
the
AddOrFind userform to open. Instead what's happening is the
AddOrFind
userform is showing on top of the AddTitle userform. How do I get
the
AddTitle userform disappear?



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Queryclose


it was attached to my first response

<iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0"
style="width:240px;height:66px;margin:3px;padding: 0;border:1px solid
#dde5e9;background-color:#ffffff;"
src="http://cid-b8e56c9a5f311cb7.skydrive.live.com/embedrowdetail.aspx/.Public/Excel%20Files/Userforms"</iframe

http://cid-b8e56c9a5f311cb7.skydrive...iles/Userforms


"Bishop" wrote in message
...
I'm not seeing this demo you're talking about. Is it an attachment?
Where
do I locate it?

"Patrick Molloy" wrote:

I never had this routine in my demo

Private Sub UserForm_QueryClose
....
End Sub


"Bishop" wrote in message
...
Thanks for the _Click info. I kept wondering why I couldn't use my
mouse
to
select those. However, I'm a little fuzzy on "just paste it in." What
am
I
pasting where?

"Patrick Molloy" wrote:

I didn't include the query close to keep the code for the keypress
events
clean.
just paste it in

you also will need

Private Sub AddButton_Click()
AddTitle.Show
End Sub

and ditto for the find and summary buttons

I could not replicate your issue though. I attached my demo file

"Bishop" wrote in message
...
Ok, that gets rid of the AddTitle userform but if I pull it up again
the
QueryClose function doesn't even respond. Clicking the red X does
nothing.

Here's how this flows so you have a better idea. When the
spreadsheet
opens
the AddOrFind userform shows. AddOrFind has 3 buttons one of which
calls
the
AddTitle userform. If I call up the AddTitle userform and click the
red X
AddTitle goes away (Me.Hide) and AddOrFind pops back up. If I
choose
AddTitle again the userform shows but the QueryClose function no
longer
responds.

"Patrick Molloy" wrote:

see below

"Bishop" wrote in message
...
I have the following code:

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
Me.Hide
'' Unload AddTitle 'rem out
AddOrFind.Show
End If
End Sub

What I'm trying to accomplish is when I click the red X (close)
in
the
upper
right corner of AddTitle I want the AddTitle userform to close
and
the
AddOrFind userform to open. Instead what's happening is the
AddOrFind
userform is showing on top of the AddTitle userform. How do I
get
the
AddTitle userform disappear?



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
UserForm QueryClose Brett Excel Programming 2 May 14th 09 05:43 AM
QueryClose problem Keith74 Excel Programming 4 October 2nd 07 03:04 PM
Userform Queryclose and Unload problem Dave Ramage Excel Programming 3 March 8th 07 07:39 PM


All times are GMT +1. The time now is 03:06 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"