+ Reply to Thread
Results 1 to 3 of 3

disable command button on userform when listbox is selected

  1. #1
    Registered User
    Join Date
    07-30-2017
    Location
    texas
    MS-Off Ver
    2016
    Posts
    99

    disable command button on userform when listbox is selected

    Greetings everyone. i have a problem i was hoping someone could help me with. i have a userform which has a listbox and a "Add" command button. the problem i am having is that when the listbox is selected and then the user hits the "Add" command button, this action causes the duplication of the highlighted information into Sheet1.

    Is there a way that when the listbox is selected that the "Add" command button is grayed out and disabled to prevent the user from using that button?

    I would appreciate any help that you can give me!

    david
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    361

    Re: disable command button on userform when listbox is selected

    you could add

    Please Login or Register  to view this content.
    AND

    Please Login or Register  to view this content.
    Last edited by Joske920; 11-07-2020 at 08:57 PM.
    Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
    If you have been helped, maybe you could click the *

  3. #3
    Registered User
    Join Date
    07-30-2017
    Location
    texas
    MS-Off Ver
    2016
    Posts
    99

    Re: disable command button on userform when listbox is selected

    Works like a champ! i was trying to just have the toggle using just the add command button. i did not even think of using the listbox click in conjunction with cmd_02. thanks for the insight!

+ 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 disable userform command button if any of the 6 textboxes are empty
    By mutzie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2020, 11:46 PM
  2. Replies: 6
    Last Post: 08-31-2017, 12:16 PM
  3. 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
  4. Replies: 2
    Last Post: 02-02-2016, 10:27 PM
  5. [SOLVED] How to update Quantity with combobox1 selected Product in userform using command button
    By svgopalareddy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2015, 05:03 AM
  6. [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
  7. Not deleting the selected data from listbox by one click on command button
    By biznez1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-31-2013, 12:05 PM

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