+ Reply to Thread
Results 1 to 10 of 10

New To Excel UserForms and tried to guess at format of ToggleButton VBA

  1. #1
    Forum Contributor
    Join Date
    03-30-2020
    Location
    Gibraltar, Gibraltar
    MS-Off Ver
    365
    Posts
    150

    New To Excel UserForms and tried to guess at format of ToggleButton VBA

    What did I do wrong?

    Please Login or Register  to view this content.
    Last edited by Michael Island; 04-05-2020 at 11:10 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new here, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

    Code works better between 'code quotes'

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

  4. #4
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

    You're missing the quote marks. "YES" is a string, whereas YES is an undefined variable, so empty. Using your existing code, this would work:
    Please Login or Register  to view this content.
    But this would be more efficient:
    Please Login or Register  to view this content.
    HTH
    Tim
    Never stop learning!
    <--- please consider *-ing !

  5. #5
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

    Or even...
    Please Login or Register  to view this content.
    Tim

  6. #6
    Forum Contributor
    Join Date
    03-30-2020
    Location
    Gibraltar, Gibraltar
    MS-Off Ver
    365
    Posts
    150

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

    Hi thanks they all worked well!

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,110

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

    Or even
    Please Login or Register  to view this content.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

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

  9. #9
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

    Or even.............
    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: New To Excel UserForms and tried to guess at format of ToggleButton VBA

    Quote Originally Posted by Fluff13 View Post
    Or even
    Please Login or Register  to view this content.
    Nice!!! Hadn't thought of that.

+ 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. Togglebutton
    By Southernw2002 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-15-2014, 07:10 AM
  2. [SOLVED] I guess there's some error or mistake in calculation ... by Excel ..
    By sufian.naeem in forum Excel General
    Replies: 22
    Last Post: 12-27-2013, 11:30 AM
  3. [SOLVED] Run Macros/Userforms in HTML format
    By pipoliveira in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2012, 11:10 AM
  4. So I guess everyone can become an Excel MVP these days
    By JieJenn in forum The Water Cooler
    Replies: 18
    Last Post: 01-03-2012, 05:24 PM
  5. Excel data type auto guess problem
    By stefen054 in forum Excel General
    Replies: 2
    Last Post: 12-05-2007, 02:00 PM
  6. Time format from Userforms
    By Brento in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-28-2006, 07:08 PM
  7. [SOLVED] Excel Woes - Formula bug (I guess)
    By mikeydread1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2006, 11:50 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