Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - Forms Exit Errors

I made a real whizbang form with a lot of enabling and disabling wit
shifting focus based on user input.

The problem is the setfocus in the form blows up when the user hit th
X to exit out of the window.

Is there a way to disable the X and just make them finish the form?

I like having forms that take the errors out and save steps by shiftin
focus - I'd _really_ hate to lose all of that. So any answers o
advise??

Thanks,
Jorda

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - Forms Exit Errors

jordanctc

This should prevent the user fron using the "X".



Private Sub userform_QueryClose(Cancel As Integer, CloseMode A
Integer)
Application.ScreenUpdating = False
If CloseMode = vbFormControlMenu Then
MsgBox "You Have to use the Exit Button to close!"
Cancel = True
End If
End Sub


HTH

Charle

--
Message posted from http://www.ExcelForum.com

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
Exit Sub Jeff Excel Discussion (Misc queries) 2 March 1st 08 06:21 PM
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM
Calling Forms from Forms - Exit problems Stuart[_5_] Excel Programming 3 May 25th 04 06:50 AM
If a called sub exit, how to the caller exit right away? luvgreen[_4_] Excel Programming 4 February 24th 04 05:06 PM


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