+ Reply to Thread
Results 1 to 5 of 5

msgbox disappear until right value entered

  1. #1
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    msgbox disappear until right value entered

    Hi,

    looking for vb code where a msgbox only disappears when value "Finished" is entered in cell A1. Until then, the msgbox stays active

    Thanks

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: msgbox disappear until right value entered

    If a message box is active you will not be able to enter data in the sheet. So what you are proposing cannot be accomplished. You could have a message box pop up everytime a value is changed in the worksheet if "Finished" is not in cell A1 or you could set up an inputbox on a loop to force a string to be entered into a cell through the input box. A UserForm could accomplish what you are wanting to do but it is a little bit trickier.
    Last edited by stnkynts; 06-17-2015 at 07:05 PM.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: msgbox disappear until right value entered

    Hi biznez,

    Try the attached sample workbook which should help you get started. It displays a 'Faux' MsgBox that disappears when cell 'A1' contains 'Finished'.

    You don't have to use my UserForm, you can use your own. The UserForm has to be opened 'NonModally'
    Please Login or Register  to view this content.
    The code that does the heavy lifting follows:
    Please Login or Register  to view this content.

    Lewis
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Re: msgbox disappear until right value entered

    Quote Originally Posted by LJMetzger View Post
    Hi biznez,

    Try the attached sample workbook which should help you get started. It displays a 'Faux' MsgBox that disappears when cell 'A1' contains 'Finished'.

    You don't have to use my UserForm, you can use your own. The UserForm has to be opened 'NonModally'
    Please Login or Register  to view this content.
    The code that does the heavy lifting follows:
    Please Login or Register  to view this content.

    Lewis
    Thanks LJMetzger ...ill look into this

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: msgbox disappear until right value entered

    I would think it would be easier to just set the UserForm ShowModal property to false, which will allow work to be perfomed on the sheet while the userform is still visible. Then trigger an unloading of the userform by worksheet_change event when A1 = Finished.

+ 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. [SOLVED] MSGBOX only if valid time is entered in a cell
    By sahdev in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2013, 04:02 PM
  2. [SOLVED] MsgBox if data entered in range is not numeric
    By kbka in forum Excel General
    Replies: 5
    Last Post: 11-19-2012, 08:35 AM
  3. Cant get MSGBOX to disappear after clicking on the OK button.
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-11-2012, 09:59 AM
  4. Entered Space in MsgBox
    By eddykk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2009, 02:28 AM
  5. [SOLVED] Tabstrip tabs entered programmatically disappear after form unload
    By cumchee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2005, 05:06 PM

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