+ Reply to Thread
Results 1 to 9 of 9

Replace macro with a toggle switch

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Replace macro with a toggle switch

    I am using the below macro to either add to a number or subtract.

    The parameters are based on affecting an adjacent cell.

    It is easy to use as it does not require doing repetitive macros like a command button would need.

    Is it possible to use a generic code for a toggle switch, like the below macro, thus making my sheet smaller and more user friendly.

    Please Login or Register  to view this content.
    Here is a copy of the book.
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Replace macro with a toggle switch

    Hello TBM,

    The Workbook you have uploaded has Sheet1 Protected with a Password. Please remove that Password for the ease of use for fellow Forum Members, or provide us with the Password.

    In the meantime you may use your Code as below:

    Please Login or Register  to view this content.

    Regards.
    Attached Files Attached Files
    Last edited by Winon; 03-15-2018 at 11:24 AM. Reason: Spelling
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Re: Replace macro with a toggle switch

    Attached is a Book with the protection off

    I am using the below macro to either add to a number or subtract.

    The parameters are based on affecting an adjacent cell.

    It is easy to use as it does not require doing repetitive macros like a command button would need.

    Is it possible to use a generic code for a toggle switch, like the below macro, thus making my sheet smaller and more user friendly.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Replace macro with a toggle switch

    How about:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Replace macro with a toggle switch

    Hi TBM,

    Thank you for adding to my Reputation.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Thanks.

  6. #6
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Re: Replace macro with a toggle switch

    How would I use this in a spin button?

  7. #7
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Re: How do Use this macro with a SPIN BUTTON

    Attached is a Book with the protection off

    I am using the below macro to either add to a number or subtract.

    The parameters are based on affecting an ADJACENT cell.

    It is easy to use as it does not require doing repetitive macros like a command button would need.

    Is it possible to use a generic code for a SPIN BUTTON, like the below macro, thus making my sheet smaller and more user friendly.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Replace macro with a toggle switch

    Hello TBM,

    I believe that the way you have it at the moment is the best option. To incorporate Spin Buttons would require a Button for each and every Cell with a Plus and/or a Minus. That is a number of plus minus 250 Spin Buttons, and Coding for each and every one of them.

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Replace macro with a toggle switch

    Hi TBM,

    Thank you for adding to my Reputation. Much appreciated

    Kind Regards.

+ 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] toggle button to switch data between sheets and back
    By smsmworld in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2017, 09:15 AM
  2. [SOLVED] Toggle Switch to hide/show column groups.
    By MLijoi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2015, 02:57 PM
  3. [SOLVED] Toggle option buttons to switch numbers
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-10-2015, 07:50 AM
  4. Macro with toggle switch for checklist
    By narrowgate88 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2009, 04:15 PM
  5. Linking a cell to a toggle switch
    By Brisbane Rob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2005, 07:41 PM
  6. [SOLVED] Toggle on/off switch for x-y graph
    By Brad in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 08-18-2005, 11:05 PM
  7. how to quickly toggle or switch to next worksheet
    By Kwong Yau Leung in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2005, 06:06 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