+ Reply to Thread
Results 1 to 7 of 7

[SOLVED]VBA - Button(Form Control)-Disable/Enable->Alternate Solution

  1. #1
    Registered User
    Join Date
    07-17-2013
    Location
    Quezon City
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    75

    [SOLVED]VBA - Button(Form Control)-Disable/Enable->Alternate Solution

    I have a FORM CONTROL in my worksheet.

    Example:

    I have (3) Buttons (Form Control) in Sheet1, each buttons have macro on it when they've been click.

    The problem is I want to DISABLE the functionality of the (3) Buttons when the user click it.

    Named:
    btn1
    btn2
    btn3

    NOTE:

    Developer tab -> Insert -> Buttons (Form Control)

    Attachment:
    SampleWorksheet.xlsb
    Last edited by mcmunoz; 09-20-2013 at 02:58 AM.

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: VBA - Button (Form Control) - Disable/Enable functions

    try this for the first button n see if it helps you
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Registered User
    Join Date
    07-17-2013
    Location
    Quezon City
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    75

    Re: VBA - Button (Form Control) - Disable/Enable functions

    Quote Originally Posted by john55 View Post
    try this for the first button n see if it helps you
    Please Login or Register  to view this content.
    Nothing happened. Still the macro of the button working. Can you make a sample in my attachment?

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: VBA - Button (Form Control) - Disable/Enable functions

    try the sample attached
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2016 / Office 365
    Posts
    115

    Re: VBA - Button (Form Control) - Disable/Enable functions

    I recommend hiding the button instead, because the above mentioned code was depreciated with Excel 2010.

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: VBA - Button (Form Control) - Disable/Enable functions

    Hi jrtraylor,

    I appreciate your advice, I'll keep in mind for future!



    mcmunoz, I am sorry I did not know about that (see the option of jrtraylor), now it's your choise.
    I've had good intentions.

    cheers
    Last edited by john55; 09-20-2013 at 01:45 AM.

  7. #7
    Registered User
    Join Date
    07-17-2013
    Location
    Quezon City
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    75

    Re: VBA - Button (Form Control) - Disable/Enable functions

    Thank you guys for helping me, John and JrTraylor

    I will use button.visble = False. Because I read some thread that in Excel 2010 even though Button set as Enabled=False still the macro will be trigger when the button is click.

    Reference: http://answers.microsoft.com/en-us/o...d-1421209aad98

    I will make this problem thread as solve. Using alternate solution.

+ 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] Excel Button Enable and Disable
    By excel_student_98 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2013, 05:34 AM
  2. [SOLVED] Button enable and disable...
    By Will03 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2013, 10:00 AM
  3. Enable/Disable Form controls on a worksheet (not Active X Control)
    By vaniravi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-29-2012, 07:42 AM
  4. [SOLVED] Enable/Disable Command Button
    By rain4uu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-06-2012, 03:27 AM
  5. [SOLVED]Enable and disable button
    By blues_oo7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2010, 06:45 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