LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with CommandButton vs Excel 2002


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CommandButton to open a Excel workbook aussiegirlone Excel Discussion (Misc queries) 2 March 25th 09 01:34 AM
CommandButton in Excel to open another Application JohannM Excel Worksheet Functions 0 September 13th 06 09:29 PM
Outlook 2002 calendar dates exported to Excel 2002 sort incorrectl scampbell Excel Worksheet Functions 0 February 22nd 06 06:31 PM
How do I embed a commandbutton from VisualBasic into Excel SIDAS Excel Programming 1 August 9th 05 12:40 PM
Running a CommandButton in Excel I get this error Bert[_4_] Excel Programming 4 May 5th 04 07:06 PM


All times are GMT +1. The time now is 03:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"