+ Reply to Thread
Results 1 to 5 of 5

On/ Off button in VBA

  1. #1
    Registered User
    Join Date
    10-05-2019
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    49

    On/ Off button in VBA

    Hi Everyone,

    I need your assistance to build the on and off button macro, here i have attached the sample file for your reference.

    so when I click the “On” button the off will hide and the range will be select in A1 is 1 or true, likewise if I select “off” button the entire oval shape should be in off. Help me to fix this.

    Thank you
    Raj
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: On/ Off button in VBA

    Both are named the same. Maybe try giving them different names first and see how far you get.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: On/ Off button in VBA

    You don't want to have just a single button changing text?
    A lot easier to maintain/change. Certainly in the future after you forgot what you had done to make it work.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: On/ Off button in VBA

    Another alternative is attached;

    .
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-05-2019
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    49

    Re: On/ Off button in VBA

    Thank you so much Haluk and Jolivanes ... have a wonderful day ahead...be safe....

    Thanks
    Raj

+ 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. Create running stopwatch/timer with 1 button (start/stop). No reset button.
    By leeroy2612 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-26-2021, 12:59 AM
  2. Replies: 1
    Last Post: 02-27-2017, 09:17 AM
  3. [SOLVED] Form - select button & retrieve button name or button's caption
    By lexusap in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-27-2016, 12:28 AM
  4. ActiveX Control Spin Button Copy Button and Change Cell reference?
    By chrstphrbllngs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2016, 04:01 PM
  5. Replies: 0
    Last Post: 06-10-2014, 10:44 PM
  6. Button to copy specific cells to another sheet, lock button if cell has text
    By elmerg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2014, 02:10 AM
  7. [SOLVED] Linking together an Options Button and a command button inorder to load separate forms
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2013, 02:10 PM

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