+ Reply to Thread
Results 1 to 5 of 5

How to make a message box pop up in user form

  1. #1
    Registered User
    Join Date
    07-06-2015
    Location
    Phoenix , AZ
    MS-Off Ver
    2010
    Posts
    47

    Unhappy How to make a message box pop up in user form

    Hello All I am new at VBA and built a user form in excel 2010 I am trying to get a message to pop up every time the end user leaves a field blank so in other words I have 32 fields- the first two fields are called first name and last name so lets say the end user puts in the first name but leaves the last name blank I want a message to pop up saying "Did you mean to leave blank". Any help is greatly appreciated please
    Thank you

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to make a message box pop up in user form

    Something like this incorporated into your SUBMIT button would check all the textboxes and give an appropriate message.
    This presumes you are filling in the TAG property for each textbox so the macro can use the TAG as part of the message.


    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 01-08-2016 at 12:08 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-06-2015
    Location
    Phoenix , AZ
    MS-Off Ver
    2010
    Posts
    47

    Re: How to make a message box pop up in user form

    I am not really sure what that means but below is my code I have a command to update and add and go to next record in the userform I just want to add a code where a message box pops up if the end user leaves a field blank. Sorry I know I seem like I am asking dumb question but again I am a newbie at vba its a whole different world for me.


    Please Login or Register  to view this content.
    Last edited by cardonas; 01-08-2016 at 01:25 AM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to make a message box pop up in user form

    The code I provided would go at the top of your UpdateForm macro. (the part in red)

  5. #5
    Registered User
    Join Date
    07-06-2015
    Location
    Phoenix , AZ
    MS-Off Ver
    2010
    Posts
    47

    Re: How to make a message box pop up in user form

    Ok so I put the code below but I get an error and when I debug it outlines the Sub field



    Please Login or Register  to view this content.

+ 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. How to Make a Search User Form
    By ruveenck in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2014, 09:46 AM
  2. Make user input form to update inventory
    By jcmckeon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2013, 07:29 AM
  3. [SOLVED] How to make a MSGBOX always pop up on top of the user form
    By delaneybob in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2012, 07:21 PM
  4. Image instead of message in User form
    By Tunk Ayauit in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-28-2011, 01:55 PM
  5. Message populate while closing user form
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-24-2010, 08:18 AM
  6. User form textbox message for input error
    By microsmith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2007, 02:50 PM
  7. make User Form inactive
    By vandanavai in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-24-2006, 04:51 AM

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