+ Reply to Thread
Results 1 to 3 of 3

How to disable userform command button if any of the 6 textboxes are empty

  1. #1
    Registered User
    Join Date
    07-29-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    79

    How to disable userform command button if any of the 6 textboxes are empty

    Hi,

    I have a userform that has 6 textboxes (textbox1 to textbox6) and 1 command button. The 6 textboxes are linked to specific cells from a worksheet and displays data in it when the form is initialized.
    The command button acts as a go to the next userform. How would I disable the command button or ensure that the command button is not clickable or usable until all 6 textboxes are populated and not blank? All 6 must contain something before the command button can work I hope.

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

    Re: How to disable userform command button if any of the 6 textboxes are empty

    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.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,986

    Re: How to disable userform command button if any of the 6 textboxes are empty

    .
    Paste this macro in the UserForm with the TextBoxes :

    Please Login or Register  to view this content.
    Edit Userform names as required.

+ 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] Hide or disable option button or show empty graph when slicer item has no data on userform
    By Raylou in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2018, 05:24 AM
  2. Disable and Enable a Command Button on a Dynamically Changing Multipage Userform
    By whazzup_billy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2017, 10:43 PM
  3. Replies: 2
    Last Post: 02-02-2016, 10:27 PM
  4. [SOLVED] Disable/make invisible command button on userform when table created
    By Mad Moose in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2015, 08:47 PM
  5. [SOLVED] Userform Command Button to add more comboboxes and textboxes at the same time
    By charscribbles in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-29-2014, 12:35 PM
  6. [SOLVED] Add to a multicolumn listbox using two textboxes and one command button
    By ChrisPatterson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-30-2014, 07:08 AM
  7. Command button to calculate textboxes
    By zplugger in forum Excel General
    Replies: 1
    Last Post: 01-12-2012, 02:52 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