MACSCRPT Archives

May 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Duncan <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 21 May 2009 23:54:14 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
Can anyone point me in the right direction for scripting multiple  
"Option Buttons" (radio buttons) in Excel?  If I have 2 option buttons  
with the same name they behave as a group and are mutually exclusive.   
I.E. if I have to Option Buttons both named "options_yesno" and one  
has caption "Yes" and one has caption "No", if you click Yes, then  
"No" deselects an vice-versa.

The problem is I can't figure out how to address any but the first  
option button.  The following code selects the "Yes" radio button  
which is the first one but I can't figure out how to address the  
second one to make "No" select.

tell application "Microsoft Excel"
	activate workbook theDocument
	tell workbook 1
		tell worksheet 1
			set the value of option button "options_yesno" to checkbox on
		end tell
	end tell
end tell

Thanks,

John Duncan
JEDtech Consulting, LLC
[log in to unmask]

ATOM RSS1 RSS2