Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Option button group name

How can I change the group name of an option button WITHIN A MACRO? I've
tried ActiveSheet.Shapes("OptionButton1").GroupName = "test" but I receive an
error message "Object doesn't support this property or method."

I can effectively change the name of the button by
"ActiveSheet.Shapes("OptionButton1").Name = "test" but I need to change the
group name. Thanks in advance!

-Chad
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Option button group name

ActiveSheet.OleObjects("OptionButton1").Object.Gro upName = "Test"

--
Regards,
Tom Ogilvy


"Chad" wrote in message
...
How can I change the group name of an option button WITHIN A MACRO? I've
tried ActiveSheet.Shapes("OptionButton1").GroupName = "test" but I receive

an
error message "Object doesn't support this property or method."

I can effectively change the name of the button by
"ActiveSheet.Shapes("OptionButton1").Name = "test" but I need to change

the
group name. Thanks in advance!

-Chad



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Option button group name

Thanks Tom! Perfect!

"Tom Ogilvy" wrote:

ActiveSheet.OleObjects("OptionButton1").Object.Gro upName = "Test"

--
Regards,
Tom Ogilvy


"Chad" wrote in message
...
How can I change the group name of an option button WITHIN A MACRO? I've
tried ActiveSheet.Shapes("OptionButton1").GroupName = "test" but I receive

an
error message "Object doesn't support this property or method."

I can effectively change the name of the button by
"ActiveSheet.Shapes("OptionButton1").Name = "test" but I need to change

the
group name. Thanks in advance!

-Chad




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Option button group name

How about just:

ActiveSheet.OptionButton1.GroupName = "test"
or
ActiveSheet.Shapes("optionbutton1").OLEFormat.Obje ct.Object.GroupName = "test"
or
ActiveSheet.OLEObjects("Optionbutton1").Object.Gro upName = "test"

I think I like the top one!

Chad wrote:

How can I change the group name of an option button WITHIN A MACRO? I've
tried ActiveSheet.Shapes("OptionButton1").GroupName = "test" but I receive an
error message "Object doesn't support this property or method."

I can effectively change the name of the button by
"ActiveSheet.Shapes("OptionButton1").Name = "test" but I need to change the
group name. Thanks in advance!

-Chad


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Option button group name

Thanks. These are all terrific!

"Dave Peterson" wrote:

How about just:

ActiveSheet.OptionButton1.GroupName = "test"
or
ActiveSheet.Shapes("optionbutton1").OLEFormat.Obje ct.Object.GroupName = "test"
or
ActiveSheet.OLEObjects("Optionbutton1").Object.Gro upName = "test"

I think I like the top one!

Chad wrote:

How can I change the group name of an option button WITHIN A MACRO? I've
tried ActiveSheet.Shapes("OptionButton1").GroupName = "test" but I receive an
error message "Object doesn't support this property or method."

I can effectively change the name of the button by
"ActiveSheet.Shapes("OptionButton1").Name = "test" but I need to change the
group name. Thanks in advance!

-Chad


--

Dave Peterson

Reply
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
Option Group in excel Daoud Fakhry Excel Discussion (Misc queries) 4 April 22nd 07 03:12 PM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
How do I lock a radio button group if a N/A button is selected worry a lot Excel Discussion (Misc queries) 2 May 21st 05 08:33 PM
Option Buttons in Group Box JAMES T. Excel Discussion (Misc queries) 4 March 22nd 05 08:59 PM
Option group and Combobox Andy Excel Programming 2 November 19th 03 12:36 PM


All times are GMT +1. The time now is 06:29 PM.

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

About Us

"It's about Microsoft Excel"