Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Close UserForm despite Exit Event

Hi all,

I am stuck with a userform I cannot close because of the exit event,
which prevents user from "forgetting" to input data.
Thanks for your hints
Cheers
Carim

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Close UserForm despite Exit Event

Try inputting the required data, then if it is coded correctly it should let
you exit.

If that fails, try doing Ctrl and hitting the Break key.

--
Regards,
Tom Ogilvy

"Carim" wrote in message
oups.com...
Hi all,

I am stuck with a userform I cannot close because of the exit event,
which prevents user from "forgetting" to input data.
Thanks for your hints
Cheers
Carim



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Close UserForm despite Exit Event

The answer my friend ...

See below, George Clark has a brilliant solution :
http://groups-beta.google.com/group/...a572c7c84 309

I Love this NG

Cheers

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Close UserForm despite Exit Event

Maybe something like this will give you a hint:

Option Explicit
Dim BlkProc As Boolean
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If BlkProc = True Then Exit Sub
If IsNumeric(Me.TextBox1.Value) Then
MsgBox "nope"
Cancel = True
End If
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
BlkProc = True
End If
End Sub

(it was a reply to a similar question--how to stop the validation msgbox from
showing up when the user hit the X buttton.)

Carim wrote:

Hi all,

I am stuck with a userform I cannot close because of the exit event,
which prevents user from "forgetting" to input data.
Thanks for your hints
Cheers
Carim


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Close UserForm despite Exit Event

Dave,

Thanks a lot for your help.
It is the solution I was looking for.
Cheers
Carim

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
Close vs. Exit in 2007 JBneedshelp Excel Discussion (Misc queries) 1 July 7th 08 09:16 PM
Exit Event Michael J. Malinsky Excel Programming 1 February 27th 04 06:40 PM
Close and Exit Excel MikeWaldron Excel Programming 0 September 8th 03 05:31 PM
Close and Exit Excel Stephan Kassanke Excel Programming 3 September 8th 03 05:30 PM
Close or Exit application Jeff[_20_] Excel Programming 0 September 8th 03 03:18 PM


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