+ Reply to Thread
Results 1 to 5 of 5

Ensure userform fields are filled in before continuing

  1. #1
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Ensure userform fields are filled in before continuing

    Hi All,

    I'm an absolute VBA novice (started teaching myself yesterday!) so please bear with me.

    My form works and inputs my data into the sheet but I want it to throw up a msgbox with an error if any of the info isn't filled in.

    These are the names of the items that need to be nonzero/true in order to accept the form:

    MaterialDrop - Dropdown box
    BatchBox - Free text box
    SupplierDrop - Dropdown box
    RejectedBox - Free text box
    RfRBox - Free text box
    ClassFrame - Frame containing 8 selectable items

    I read that there's a way to do it by marking the tag property of each item as MUST and then referencing back to that so I've put MUST on each one but don't know how to code it.

    Here is the code for the button click:

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: Ensure userform fields are filled in before continuing

    It would be helpful to actually see the userform and worksheet with all the code you have in place. In this manner, we can diagnose the patient without having to guess as to what you have created.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Ensure userform fields are filled in before continuing

    Sure thing, sheet is attached.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Ensure userform fields are filled in before continuing

    Try something like this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  5. #5
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Ensure userform fields are filled in before continuing

    Thanks AlphaFrog, works a treat!

+ 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. Ensure selected cell is filled before proceed to VBA language
    By alexnkc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2013, 09:17 PM
  2. [SOLVED] Ensure TextBoxes are Filled in VBA Forms
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-07-2012, 04:18 PM
  3. How to ensure all form fields are completed.
    By singerbatfink in forum Word Formatting & General
    Replies: 3
    Last Post: 02-23-2012, 06:19 AM
  4. Ensure TextBoxes are Filled in VBA Forms
    By Mordred in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2011, 09:30 PM
  5. Ensure userform fields are complete
    By pkling in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-23-2010, 06:48 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