|
-
Nov 17th, 2010, 01:03 PM
#1
Thread Starter
Lively Member
[RESOLVED] Choosing between multiple comboboxes
Hello one more,
I have a program issue I am trying to work on. I have multiple comboboxes
(12 total) on a form.
I am attempting to update some settings from what ever the user selects from the combo boxes.
I am trying to keep the code as small as possible, so I thought about having all the comboboxes have similar names only different by a number being changed at the end. (ex: cbo_1, cbo_2, cbo_3, etc...)
And using a For next loop to advance through each combobox and update the settings as the for next loop advances.
(This might be a stupid way of doing it, but its the first idea that came to mind.)
[CODE]
Public Sub btn_Update_Click(etc....)
For i = 1 to 12 <--- Loops 12 times
My.Settings.Item("Setting_" & i) = cbo_ & i.SelectedItem
Next
Any help would be greatly appreceated.
Thanks,
Richard - 
--------
-->Newbie Coder<<--
Using VB.NET 2008/.NET 2.0/3.5
Tags for this Thread
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
|