+ Reply to Thread
Results 1 to 2 of 2

Prevent closing MsgBox from X

  1. #1
    Forum Contributor
    Join Date
    03-09-2004
    Posts
    140

    Prevent closing MsgBox from X

    Hi there

    Somtimes you need to drive the user to press one of the choices of a Msgbox (OK NO Cancel)..............so i want to prevent the user to close the Msgbox
    vis X button at the top right corner.....

    Is there a code does the job ?

    Thank u in Advance
    Yours
    hesham Almakki
    http://www.almakki.com.ly/

  2. #2
    Registered User
    Join Date
    08-25-2004
    Posts
    82
    i know this can be done if you are using forms

    and the code to do this looks like this

    Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    If CloseMode = vbFormControlMenu Then
    Cancel = True
    MsgBox "type your message here if the user presses the X button"
    End If
    End Sub

    I hope that helps.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1