Results 1 to 3 of 3

Thread: Changing a checkbox from another control event

  1. #1
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    688

    Default Changing a checkbox from another control event

    I have a checkbox on one of my modeless forms that when clicked (checked or unchecked) switches out some images and does some other simple stuff according to its "checked" value. I'd like to be able to click something else on my userform, say a button, and have it check the checkbox (CheckBox1.Checked = True) and then all the "stuff" gets changed as if I physically checked the checkbox myself on the form. How can I do this? apparently it's not as easy as just putting the above code in the button click event. I get an error everytime I click the button and nothing happens, including the checkbox changing.

  2. #2
    I could stop if I wanted to msretenovic's Avatar
    Join Date
    2002-02
    Location
    Galloway, Oh
    Posts
    304

    Smile Re: Changing a checkbox from another control event

    If you have everything contained in a function, you should just be able to call that function after you set your checkbox to checked (i.e. the event function for checking and unchecking your control).

    HTH,
    Michael K. Sretenović
    Most folks are about as happy as they make up their minds to be.
    -Abraham Lincoln (1809-1865)
    -16th president of The United States of America (1861 - 1865)

  3. #3
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    688

    Default Re: Changing a checkbox from another control event

    Thanks for the replys. That sounds easy enough. I always feel like such a bonehead for not thinking of easy stuff like that. Of course when I originally wrote the code inside the checkbox_changed event (whatever it's called) I didn't think I'd be calling it or its functions from another control until I thought up some new cool stuff for it to do.

    P.S. Mmmm... Spaghetti tastes good

Similar Threads

  1. Control Insert Window Explode Checkbox Macro?
    By joe.strobel in forum AutoCAD Customization
    Replies: 4
    Last Post: 2009-07-23, 04:47 PM
  2. Tag Leader Checkbox
    By KEC091507 in forum Revit - Platform
    Replies: 4
    Last Post: 2009-07-22, 09:23 PM
  3. Replies: 7
    Last Post: 2007-02-13, 03:17 PM
  4. CheckBox Controls
    By humberto in forum VBA/COM Interop
    Replies: 1
    Last Post: 2004-10-02, 04:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •