|
-
Aug 5th, 2012, 04:43 AM
#1
Thread Starter
Junior Member
[RESOLVED] Looking for a checkbox shortcut
So I'm building a semi-complex math program with my own specialized functions for performing operations on a number or a group of numbers. The user interface is designed so that the user can choose which functions will take place. (Order is non specific - meaning each function performs correctly regardless of any other functions behavior/they are all mutually exclusive). I know basically how to code the program, but I'd call it the hard way. I can perform multiple if then statements that execute each function if the check box is selected. That's fine but with functions ranging in the hundreds, that's a lot of code just to see if the checkboxes are selected. In this case I don't think a select case statement would work because it to would be long winded depending on the number of possibilities. Unfortunately I don't see a for... each or for next loop working since each check box relates to a different function. So the question essentially is, is there a short cut to this tedium? Is there a code snippet or an idea for a methodology that would allow me to iterate or run through the checkboxes, finding which are selected and executing each assigned function as the user dictates? Or is the most concise method simply if, then, if then, if then, ad infinitum?
VB 2010 Express edition if it matters.
'Side note, I don't want the functions to perform upon the checkbox being clicked. The checkboxes will have no click event. While this may be a possibility (for simplification), I want to be able to assign default selections and have the user only manipulate the numbers to perform functions on and only select or deselect functions as deemed necessary or desired.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|