Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping Option Buttons

I would like to have 12 option buttons grouped together in each row.
The option buttons for each row should be independent of the ones in
the other row.

I added option buttons from the forms toolbar for the first row and
drew a group box around them. I did the same for the second row. After
selecting a box on the first row, I then select a box on the second
row. Selecting a box on the second row deselects the box on the first
row. Both rows are being treated as one group. I need them to be
independent. The user should be able to select one option for each row.

I've tried setting the cell link to the first cell for each row under
Format Control. But setting the cell link to the first cell in row 2
also changes the cell link to the same value in row 1. In other words,
I'm not able to have A1 as the cell link for row 1 and A2 as the cell
link for row 2 at the same time. It's always A1 for both rows or A2 for
both rows.

What am I doing wrong? Should I be using the forms toolbar or the
control toolbox? It seems that it should be very straightforward.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Grouping Option Buttons

putting a groupbox around your optionbuttons from the forms toolbar should
work. I suspect your controls overlap or are not totally contained in the
groupbox.

Get one row working.

Go down several rows (to insure no overlap) and get a second row working.

to convince yourself it can be done.

If you switch to the control toolbox toolbar, you will have to link to
separate cells for each button. You use the groupname property to group
them. Use any name you wish for the groupname but each group should have
unique names.

--
Regards,
Tom Ogilvy


" wrote:

I would like to have 12 option buttons grouped together in each row.
The option buttons for each row should be independent of the ones in
the other row.

I added option buttons from the forms toolbar for the first row and
drew a group box around them. I did the same for the second row. After
selecting a box on the first row, I then select a box on the second
row. Selecting a box on the second row deselects the box on the first
row. Both rows are being treated as one group. I need them to be
independent. The user should be able to select one option for each row.

I've tried setting the cell link to the first cell for each row under
Format Control. But setting the cell link to the first cell in row 2
also changes the cell link to the same value in row 1. In other words,
I'm not able to have A1 as the cell link for row 1 and A2 as the cell
link for row 2 at the same time. It's always A1 for both rows or A2 for
both rows.

What am I doing wrong? Should I be using the forms toolbar or the
control toolbox? It seems that it should be very straightforward.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping Option Buttons

Tom,

You are correct. Apparently my group boxes were overlapping. It works
now.


Dave,

Someone else at work had just found the page you posted the link to. I
was just looking at your macro when I checked back here and saw your
reply. I'll see if I can adapt it to my project.

Thanks to both of you.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping Option Buttons

Tom,

You are correct. Apparently my group boxes were overlapping. It works
now.


Dave,

Someone else at work had just found the page you posted the link to. I
was just looking at your macro when I checked back here and saw your
reply. I'll see if I can adapt it to my project.

Thanks to both of you.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping Option Buttons

Dave,

I was able to user your macro for my project.

Do you know of a way to sort the columns with the option buttons after
the user makes the selections? We will have a spreadsheet that a user
fills in from a list. The columns to the left of the columns with the
option buttons will be filled in by the user. The first column contains
the last name of a student. The data will be sorted by last name after
everything is entered. The columns with the option buttons are not
being sorted with the rest of the columns. Can I sort the columns with
the option buttons along with the other columns?

Thanks for any help.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping Option Buttons

It's kind of strange. Columns A to H have data the user enters. Columns
I to T have the option buttons. Column U is the cell link. If I select
columns A to U and use Data|Sort, it will sort all the columns
including U except columns I to T (with option buttons). If I select
columns A to T, it will sort I to T. Of course column U is excluded on
the latter. I tried setting the cell link to a column left of the
option buttons. If I then select all columns, it will sort the columns
with the option buttons but not the column containing the cell link
value. I'm stumped.

Dave Peterson wrote:
Make sure you include all the columns that need to be sorted in the range to be
sorted.

If you're selecting one column and then using the icon on the Standard toolbar,
try selecting the whole range and use Data|Sort.

wrote:

Dave,

I was able to user your macro for my project.

Do you know of a way to sort the columns with the option buttons after
the user makes the selections? We will have a spreadsheet that a user
fills in from a list. The columns to the left of the columns with the
option buttons will be filled in by the user. The first column contains
the last name of a student. The data will be sorted by last name after
everything is entered. The columns with the option buttons are not
being sorted with the rest of the columns. Can I sort the columns with
the option buttons along with the other columns?

Thanks for any help.


--

Dave Peterson


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Grouping Option Buttons

Ahhh. When I sorted, I only looked at the results of the data.

You're right, the linked cells don't stay with the row with the groupbox/option
buttons.

I think you'll have to reassign those linked cells after sorting.

So I would think that you'd have to sort the data in code, too.

wrote:

It's kind of strange. Columns A to H have data the user enters. Columns
I to T have the option buttons. Column U is the cell link. If I select
columns A to U and use Data|Sort, it will sort all the columns
including U except columns I to T (with option buttons). If I select
columns A to T, it will sort I to T. Of course column U is excluded on
the latter. I tried setting the cell link to a column left of the
option buttons. If I then select all columns, it will sort the columns
with the option buttons but not the column containing the cell link
value. I'm stumped.

Dave Peterson wrote:
Make sure you include all the columns that need to be sorted in the range to be
sorted.

If you're selecting one column and then using the icon on the Standard toolbar,
try selecting the whole range and use Data|Sort.

wrote:

Dave,

I was able to user your macro for my project.

Do you know of a way to sort the columns with the option buttons after
the user makes the selections? We will have a spreadsheet that a user
fills in from a list. The columns to the left of the columns with the
option buttons will be filled in by the user. The first column contains
the last name of a student. The data will be sorted by last name after
everything is entered. The columns with the option buttons are not
being sorted with the rest of the columns. Can I sort the columns with
the option buttons along with the other columns?

Thanks for any help.


--

Dave Peterson


--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Grouping Option Buttons

If you rightclick on each of the buttons and choose Format Control, then the
Properties tab, you should see that the "move, but don't size with cells" is
checked.

And if your zoom isn't set to 100%, the buttons may not be in the cells that you
think they are.

I'd make sure that the zoom is set to 100% when I added them and the same when
the data is sorted.

====
Just to add to the previous message:

And the linked cell is assigned to an address--not the cell. So if the buttons
change position (say from row 24 to row 2), the linked cell/address is still in
row 24.



Dave Peterson wrote:

Ahhh. When I sorted, I only looked at the results of the data.

You're right, the linked cells don't stay with the row with the groupbox/option
buttons.

I think you'll have to reassign those linked cells after sorting.

So I would think that you'd have to sort the data in code, too.

wrote:

It's kind of strange. Columns A to H have data the user enters. Columns
I to T have the option buttons. Column U is the cell link. If I select
columns A to U and use Data|Sort, it will sort all the columns
including U except columns I to T (with option buttons). If I select
columns A to T, it will sort I to T. Of course column U is excluded on
the latter. I tried setting the cell link to a column left of the
option buttons. If I then select all columns, it will sort the columns
with the option buttons but not the column containing the cell link
value. I'm stumped.

Dave Peterson wrote:
Make sure you include all the columns that need to be sorted in the range to be
sorted.

If you're selecting one column and then using the icon on the Standard toolbar,
try selecting the whole range and use Data|Sort.

wrote:

Dave,

I was able to user your macro for my project.

Do you know of a way to sort the columns with the option buttons after
the user makes the selections? We will have a spreadsheet that a user
fills in from a list. The columns to the left of the columns with the
option buttons will be filled in by the user. The first column contains
the last name of a student. The data will be sorted by last name after
everything is entered. The columns with the option buttons are not
being sorted with the rest of the columns. Can I sort the columns with
the option buttons along with the other columns?

Thanks for any help.

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping Option Buttons

Dave,

Thanks for the clarification on the linked cell. For my purposes, it
probably won't matter if the address remains in the original row after
the sort. I would only need the value in that cell to sort with its
corresponding cells in the other columns. I'm still not able to get
those values and the cells with the option buttons to sort at the same
time. It is always one or the other.

The zoom is set to 100%, and "move, but don't size with cells" is
checked. I also verified that each button is in the "correct" cell.

I don't know what to do at this point. Thanks for your help.

Dave Peterson wrote:
If you rightclick on each of the buttons and choose Format Control, then the
Properties tab, you should see that the "move, but don't size with cells" is
checked.

And if your zoom isn't set to 100%, the buttons may not be in the cells that you
think they are.

I'd make sure that the zoom is set to 100% when I added them and the same when
the data is sorted.

====
Just to add to the previous message:

And the linked cell is assigned to an address--not the cell. So if the buttons
change position (say from row 24 to row 2), the linked cell/address is still in
row 24.



Dave Peterson wrote:

Ahhh. When I sorted, I only looked at the results of the data.

You're right, the linked cells don't stay with the row with the groupbox/option
buttons.

I think you'll have to reassign those linked cells after sorting.

So I would think that you'd have to sort the data in code, too.

wrote:

It's kind of strange. Columns A to H have data the user enters. Columns
I to T have the option buttons. Column U is the cell link. If I select
columns A to U and use Data|Sort, it will sort all the columns
including U except columns I to T (with option buttons). If I select
columns A to T, it will sort I to T. Of course column U is excluded on
the latter. I tried setting the cell link to a column left of the
option buttons. If I then select all columns, it will sort the columns
with the option buttons but not the column containing the cell link
value. I'm stumped.

Dave Peterson wrote:
Make sure you include all the columns that need to be sorted in the range to be
sorted.

If you're selecting one column and then using the icon on the Standard toolbar,
try selecting the whole range and use Data|Sort.

wrote:

Dave,

I was able to user your macro for my project.

Do you know of a way to sort the columns with the option buttons after
the user makes the selections? We will have a spreadsheet that a user
fills in from a list. The columns to the left of the columns with the
option buttons will be filled in by the user. The first column contains
the last name of a student. The data will be sorted by last name after
everything is entered. The columns with the option buttons are not
being sorted with the rest of the columns. Can I sort the columns with
the option buttons along with the other columns?

Thanks for any help.

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Grouping Option Buttons

That column of linked cells sorted with the data in my tests.

But if I clicked on any of the buttons, the linked cell updated--and it may not
have been in the same row.

If you need the cell that gets updated to be on the same row as the buttons, I
think you'll have to reassign those linked cells.

wrote:

Dave,

Thanks for the clarification on the linked cell. For my purposes, it
probably won't matter if the address remains in the original row after
the sort. I would only need the value in that cell to sort with its
corresponding cells in the other columns. I'm still not able to get
those values and the cells with the option buttons to sort at the same
time. It is always one or the other.

The zoom is set to 100%, and "move, but don't size with cells" is
checked. I also verified that each button is in the "correct" cell.

I don't know what to do at this point. Thanks for your help.

Dave Peterson wrote:
If you rightclick on each of the buttons and choose Format Control, then the
Properties tab, you should see that the "move, but don't size with cells" is
checked.

And if your zoom isn't set to 100%, the buttons may not be in the cells that you
think they are.

I'd make sure that the zoom is set to 100% when I added them and the same when
the data is sorted.

====
Just to add to the previous message:

And the linked cell is assigned to an address--not the cell. So if the buttons
change position (say from row 24 to row 2), the linked cell/address is still in
row 24.



Dave Peterson wrote:

Ahhh. When I sorted, I only looked at the results of the data.

You're right, the linked cells don't stay with the row with the groupbox/option
buttons.

I think you'll have to reassign those linked cells after sorting.

So I would think that you'd have to sort the data in code, too.

wrote:

It's kind of strange. Columns A to H have data the user enters. Columns
I to T have the option buttons. Column U is the cell link. If I select
columns A to U and use Data|Sort, it will sort all the columns
including U except columns I to T (with option buttons). If I select
columns A to T, it will sort I to T. Of course column U is excluded on
the latter. I tried setting the cell link to a column left of the
option buttons. If I then select all columns, it will sort the columns
with the option buttons but not the column containing the cell link
value. I'm stumped.

Dave Peterson wrote:
Make sure you include all the columns that need to be sorted in the range to be
sorted.

If you're selecting one column and then using the icon on the Standard toolbar,
try selecting the whole range and use Data|Sort.

wrote:

Dave,

I was able to user your macro for my project.

Do you know of a way to sort the columns with the option buttons after
the user makes the selections? We will have a spreadsheet that a user
fills in from a list. The columns to the left of the columns with the
option buttons will be filled in by the user. The first column contains
the last name of a student. The data will be sorted by last name after
everything is entered. The columns with the option buttons are not
being sorted with the rest of the columns. Can I sort the columns with
the option buttons along with the other columns?

Thanks for any help.

--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


--

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
Grouping Option Buttons ion a Group Box [email protected] New Users to Excel 5 October 15th 06 07:29 PM
Auto Grouping of Option Buttons Rafat Excel Programming 4 July 7th 06 04:30 PM
Grouping radio option buttons ahmed Excel Programming 1 May 1st 06 11:13 PM
grouping of option buttons mapi62 Excel Discussion (Misc queries) 0 February 22nd 05 12:19 PM
Grouping Option Buttons m@_ Excel Programming 3 November 5th 03 02:20 AM


All times are GMT +1. The time now is 04:00 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"