Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default X button query

Hi all how can I have it when someone clicks on the X button of any userform
it loads up the userform"main"

Thanks in advance

Greg


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default X button query

Hi Greg,

Try inserting this code into the QueryClose event for each form in question:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
main.Show
End If
End Sub

Hope this helps,

Mark


"Greg B" wrote:

Hi all how can I have it when someone clicks on the X button of any userform
it loads up the userform"main"

Thanks in advance

Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default X button query



Thanks did not think of it that way

Greg

*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default X button query

It is ok Some one has helped me on this one.

Greg
"Greg B" wrote in message
...
Hi all how can I have it when someone clicks on the X button of any

userform
it loads up the userform"main"

Thanks in advance

Greg




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
why does edit query button not open query needlemaker Excel Discussion (Misc queries) 0 June 29th 06 03:18 PM
X button query Greg B Excel Discussion (Misc queries) 2 September 2nd 05 04:05 PM
how to create button commande to refresh data in query in excel 2. Jean-Francois Excel Discussion (Misc queries) 1 January 6th 05 08:03 PM
Command button macro query BeSmart[_2_] Excel Programming 5 April 15th 04 01:27 PM
Assigning a query to a control button StephanieL Excel Programming 1 February 27th 04 01:32 PM


All times are GMT +1. The time now is 12:07 PM.

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"