+ Reply to Thread
Results 1 to 6 of 6

Return Toggle Button to default state

  1. #1
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Return Toggle Button to default state

    Hi,

    I am using a Toggle Button on my userform and when it is clicked the first time, I have an IF statement to meet a condition and if it doesn't then I EXIT SUB. My question is, how do I return the toggle button to the original state when I exit sub? I have to press it again to return to the original state once I exit sub which I don't want to do. I have tried:

    Please Login or Register  to view this content.
    After I exit sub, but nothing seems to work.

    Thanks for any help!

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Return Toggle Button to default state

    you need to reset the toggle button before you exit sub I reckon
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Return Toggle Button to default state

    JosephP ... thanks for the reply.

    I have tried that, and here is the code. When I do that, my message box fires twice?

    Please Login or Register  to view this content.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Return Toggle Button to default state

    basically you need
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Return Toggle Button to default state

    Thanks very much... works like a charm!

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Return Toggle Button to default state

    my pleasure-please don't forget to mark the thread solved :-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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