+ Reply to Thread
Results 1 to 4 of 4

Prevent clicking the submit button until all fields are filled out

  1. #1
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    Prevent clicking the submit button until all fields are filled out

    I have a Userform to enter several fields. I want to make sure the user is unable to click submit question (Grayed out???) unless all fields are filled out.

    What action would I do to have this happen.

    below is my code.


    Thanks for everything guys!!!

    Matt

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: Prevent clicking the submit button until all fields are filled out

    Under the Dim's within your Submit Questions Button sub you can paste something like below. Check that it includes all your questions as i'm only assuming which ones are the questions based on my understanding of your code.


    Please Login or Register  to view this content.
    Last edited by playaller; 05-14-2014 at 12:36 PM.


    Shelton A.
    If Helpful, Add Reputaion!

  3. #3
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    Re: Prevent clicking the submit button until all fields are filled out

    Thank you sir!

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,679

    Re: Prevent clicking the submit button until all fields are filled out

    You can also put a public variable at the top of the module:
    Public AnswerCount As Long
    In each Ans_Click sub, when the answer is entered, increment the AnswerCount by 1.
    Then in the Submit button code, check the number against the total number of questions. If less then pop up a message.
    Ben Van Johnson

+ 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. Replies: 1
    Last Post: 02-05-2012, 09:31 PM
  2. Clicking on Submit button in web page hangs up VBA code....
    By xlkugan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-12-2012, 09:56 AM
  3. Clicking a submit button after macro opens webpage.
    By CJPHX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-09-2010, 08:55 AM
  4. Create a Submit button save filename as A1, submit email unc path, etc.
    By briant97 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-30-2009, 09:52 AM
  5. how to prevent user from clicking a button on error
    By ballack in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2007, 12:17 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