Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UserForm QueryClose | Excel Programming | |||
QueryClose problem | Excel Programming | |||
Userform Queryclose and Unload problem | Excel Programming |