+ Reply to Thread
Results 1 to 6 of 6

Easy option button question

  1. #1
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267

    Easy option button question

    I am new to option buttons and I have a pretty simple question. I have written a macro to run a certain way if the option button is clicked. So the code runs when

    OptionButton1.Value = True
    My easy question is: How do I set it back to being unclicked? Is there a line of code I should put in?

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    That's what I did, but it didn't work. I made a button you could push and I used

    OptionButton1.Value = False
    as the code, but I got an error. It says "Object Required". Any idea what's going on?

  4. #4
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    I got it to work when I put the code on the code for the sheet rather than in a module. That did the trick. Thanks anyways.
    Last edited by wmorrison49; 10-30-2007 at 11:01 AM.

  5. #5
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Sorry. I missed the post. If you wanted to keep the code in a module rather than in the sheet code, you just have to add the sheet name:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    That's simple enough. Thanks for your help.

+ 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