Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a Group Box Frame

Status
Not open for further replies.

mcelligott

Programmer
Apr 17, 2002
135
US
Hi All,

I have a spread sheet with some VBA code behind it. The code primarily is checking to make sure the spread sheet is filled out. I have option buttons located within a group box. One of the things I check is to make sure one of the option buttons have been selected (no problem there). What I would like to do is select the group box frame if one of the option buttons within it have not been selected showing the user this is the where they did not select an option. Is there a way to do this? I can select a cell range if something is not filled in but can not figure out how to do it with a group box.

Any help would be greatly appreciated.

Thanks,

Bob
 
Hi Bob,

You ought to REFERENCE any control or object, rather than SELECT.

How many Option Buttons do you have within your Group Box?

Are these ActiveX or Form controls?
 
I'd rather add transparent label/rectangle (depending on controls you use - Activex or Form controls, as Skip points), if nothing is selected it has red border, otherwise no border.
Alternatively frames can initially have default options selected, in this case there is no need to test if frame has no option selected.

combo
 
Hi Skip and combo,

I have a form control group box with two form control option buttons within it (the user is to select yes or no). The option buttons are bound to a cell so it I can test to see if there is something selected. When the user attempts to submit the spreadsheet (by clicking on the submit button) and they have not selected either yes or no within the group box, I would like to be able to select the group box frame (similar to selecting a cell) so the user knows where they negelected to answer. Hope that clarifies things.

Bob
 
Selected frame is messing for the user. As I wrote, I would consider other way to notice user than he needs to select option (rectange in case of forms control). Alternatively, you can disable "submit" burtton by default and enable it if linked cell is not empty.[pre][/pre]

combo
 
Hi combo,

I'm sorry but I do not understand the first part of your response. Can you explain further? The second part about hiding the submit button is not an option. There are many more things that are happening in the background that it is checking whent the button is clicked.

Thanks,

Bob
 
Have you considered changing BackColor of the frame (group box) if no Yes/No option is selected?

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Right-ckick frame to have it selected. Imagine that you are an user and suddenly this happens in front of you. Now you can resize the frame. You can click option button, but the frame still remains selected. Try to write something, you will overwrite frame's text. For me it's not preferable behaviour.
I meant rather disabling than hiding the button. The button is always visible, you can dynamically change caption and font colour to indicates that data is not complete. If you have linked cells, after every change you can test conditions and, if all is filled properly, enable button, change caption and/or colour.

combo
 
>The second part about hiding the submit button is not an option.

Well ... there's a strong argument that it ought to be (disabled, a per combo's suggestion, rather than hidden). MMI design principles suggest that you shouldn't offer a user an action that isn't currently allowed. In other words, if following such principles, the submit button should not be available if it is not actually possible to submit ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top