+ Reply to Thread
Results 1 to 5 of 5

Required Fields

  1. #1
    Registered User
    Join Date
    11-21-2007
    Posts
    15

    Required Fields

    I need help again. I'm so confused. It doesn't seem like a hard concept but it definetly is tricky. I have a new customer setup for that a ton of people use and there are errors on them all the time. I'm trying to elimate these by requiring certain cells to contain data. They must not be blank. What I have right now is just alot of If/Then statements that

    Please Login or Register  to view this content.
    So it works to the point that if one of those cells is blank, it tells you what you must enter. What I would like for it to do is to go through each field and check to see if there is data there, and if there isn't, I'd like to to stop at that field so that the person could type what they needed there. And once they finished typing they'd try and send the form again with another macro I have and it would repeat the process of checking. I would like it to continue runnin my macro called "FinalMacro" IF all of the fields I need to contain data, do.

    It sounds confusing and let me know if I need to clarify something. Thanks a bunch and you guys are amazing!!!

    -Jerad

  2. #2
    Registered User
    Join Date
    01-09-2007
    Posts
    59
    Try this:
    Please Login or Register  to view this content.
    ska

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    After each msgbox command use an Exit Sub command or a goto command
    I note that you do not use Application.DisplayAlerts = True in your macro

    Example 1 - Does not reset DisplayAlerts to True
    Please Login or Register  to view this content.
    Eaxmple 2
    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Registered User
    Join Date
    11-21-2007
    Posts
    15

    Amazing

    Thank you so much! It works! I'm still trying to figure out how when it ends it will go to that specific field. I think you wrote it in your code, I'm going back to check now. Thanks again! You're great!

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    This will check each of the requiredCells and, if it is empty, prompt the user for the correct info and put it into the cell required.

    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)

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