#1   Report Post  
Greg B
 
Posts: n/a
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  
Mark Hone
 
Posts: n/a
Default

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  
Greg B
 
Posts: n/a
Default

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
MS Query not installed for New Database Query Malcolm Walker Excel Discussion (Misc queries) 0 August 2nd 05 10:58 PM
Web Query Help... Jambruins Excel Discussion (Misc queries) 1 July 29th 05 06:56 PM
"Query cannot be edited by the Query Wizard" PancakeBatter Excel Discussion (Misc queries) 0 April 25th 05 05:59 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
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


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