+ Reply to Thread
Results 1 to 3 of 3

Faux MsgBox as vbModeless

  1. #1
    Registered User
    Join Date
    08-15-2008
    Location
    London
    Posts
    11

    Question Faux MsgBox as vbModeless

    Hi all,

    Another little question for you all:

    This time I've got a MsgBox which appears if a file can't be found. What I'd ideally like to happen is that the user (upon receiving the MsgBox) will then switch to another app, export the data to Excel, save in aforementioned location then hit "Retry" on the MsgBox to get the macro to check again. Assuming the file is there, I want the macro to continue going through the code.

    I'm aware that the standard MsgBox is vbModal and cannot be changed from that state.

    Is there another function I could use instead of MsgBox which will allow the user to interact with Excel whilst the macro is waiting for either the "Retry" or "Cancel" response?

    Many thanks as always,

    Peter

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Faux MsgBox as vbModeless

    There is not a built-in one but you can make your own. In your VBA project, copy CustomMsgBox from this project--it's a form that will act as a modeless MsgBox with Retry and Cancel buttons. The comments in the code will tell you how to use it.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-15-2008
    Location
    London
    Posts
    11

    Re: Faux MsgBox as vbModeless

    Hi Jeff,

    Looks good, will be testing it very soon! Thank you, you've saved me quite a bit of time!

    Peter

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. userform not showing text when run vbModeless
    By Sliman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2017, 05:36 PM
  2. How does the "vbModeless" in "UserForm.show vbModeless" work?
    By aijp in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-13-2013, 07:43 PM
  3. vbModeless form problem?
    By tom_19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-25-2011, 05:41 PM
  4. [SOLVED] vbModeless Question
    By MWS in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2006, 05:00 PM
  5. Help with vbModeless
    By systematic in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-18-2005, 07:35 PM

Tags for this Thread

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