+ Reply to Thread
Results 1 to 1 of 1

Excel 2003 onClick event for OptionButton

  1. #1
    Registered User
    Join Date
    06-18-2010
    Location
    Columbia, IL
    MS-Off Ver
    Excel 2003
    Posts
    1

    Excel 2003 onClick event for OptionButton

    Hello, all!

    This forum has been of assistance to me before, through using Google searches, but now I've run up against a problem to which I can't seem to find the solution. There are a lot of answers out there, but most of them just seem to be along the nature of "Why would you want to do that?" I'm confident that this forum of experts will have a real answer for me (thanks in advance).

    Here's the problem (trying to keep it as basic as I can):

    I have an Excel worksheet with two Frames in it, named Frame1 and Frame2. Within each of these frames are two OptionButtons, named OptionButton1 and OptionButton2. I have been able to access the states of these OptionButtons individually throught the use of statements like this:

    Frame1.Controls.Item(1) = True

    However, I'm having a problem capturing the OnClick events from these option buttons. I am thinking that the only way to do this is to try to assign the OnClick event for each of them to a Sub that I've created manually. But something like:

    Frame1.Controls.Item(1).OnClick = "Frame1.OptionButton_Click" doesn't seem to work (since it's looking for a boolean value).

    My goal is to be able to control the state of the OptionButtons in one Frame by reading the state of the OptionButtons in the other Frame.

    I've seen solutions that would place the OptionButtons outside the Frames altogether, but for asthetic reasons (and for the ability to hide Frames at will), I would like to keep them in the frames.

    I've attached the Excel file with which I've been working. You'll be able to see my (non-working) VB code by going into Design Mode.

    Does anyone know if this is possible?

    Once again, thanks in advance.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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