Results 1 to 11 of 11

Make a loop for disable closing the UserForm

Threaded View

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Make a loop for disable closing the UserForm

    Hi to all,

    How are you? I think my question is very easy today ok... i have below code for prevent to close a user form:

    If CloseMode = vbFormControlMenu Then
    Cancel = True
    MsgBox "You can't close the dialog like this!"
    UserForm1.Show
    End If
    But this work to me only one time, when i make a second press on close button user form close ;(
    I think i have to make a loop or something but i really don't now how?

    Thank you for help!
    Last edited by zeko90; 06-04-2014 at 05:20 AM. Reason: like this is better!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Disable Closing Of Workbook Until Cells Receive Data
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-08-2012, 03:05 PM
  2. Keep Modal UserForm Alive after closing 2nd userform using 2007?
    By ShredDude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2008, 03:12 PM
  3. disable closing of workbook
    By Varun Nair in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2006, 08:55 AM
  4. [SOLVED] how to disable save prompt on closing excel file in automated mode
    By vipag@yahoo.com in forum Excel General
    Replies: 3
    Last Post: 07-06-2005, 06:05 PM
  5. Disable closing workbook
    By Edcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2005, 04:26 AM

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