Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() David, You're right. I finally found a reference that says that ActiveX controls, which are employed by the "Command Toolbox" and which use the embedded object scheme "=EMBED()", are not available on Mac versions of Excel. It seems that all of these embedded objects need to be changed to "Form" buttons, check boxes, and option buttons. I've put together a short section of code to switch option buttons on and off. I am having trouble switching just one button off. When I set the button to xlOff, all of the buttons turn off. The method seems to work fine if I use a check box. What I would like to do in the end with the option buttons is put out a set of discrete choices with an option button next to each. When a particular option button is selected I want to turn all the other ones off. Sub TestButton2_Click() Dim myButton1 As OptionButton Set myButton1 = ActiveSheet.OptionButtons(Application.Caller) If myButton1.Value = xlOn Then Call MsgBox("Checked") ElseIf myButton1.Value = xlOff Then Call MsgBox("Unchecked") Else Call MsgBox("Neither") End If myButton1.Value = xlOff End Sub Sub TestButton3_Click() Dim myButton3 As OptionButton Set myButton3 = ActiveSheet.OptionButtons(Application.Caller) If myButton3.Value = xlOn Then Call MsgBox("Checked") ElseIf myButton3.Value = xlOff Then Call MsgBox("Unchecked") Else Call MsgBox("Neither") End If End Sub When I select TestButton2, a message displays showing that TestButton2 is on, and then both buttons reset when I only want TestButton2 to reset. Help! -- YoungGuy ------------------------------------------------------------------------ YoungGuy's Profile: http://www.excelforum.com/member.php...o&userid=29654 View this thread: http://www.excelforum.com/showthread...hreadid=493663 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CommandButton to open a Excel workbook | Excel Discussion (Misc queries) | |||
CommandButton in Excel to open another Application | Excel Worksheet Functions | |||
Outlook 2002 calendar dates exported to Excel 2002 sort incorrectl | Excel Worksheet Functions | |||
How do I embed a commandbutton from VisualBasic into Excel | Excel Programming | |||
Running a CommandButton in Excel I get this error | Excel Programming |