|
-
Jan 31st, 2006, 04:17 PM
#1
Thread Starter
Lively Member
-
Jan 31st, 2006, 04:32 PM
#2
Re: How to load several comboboxes with the same list
You could move the adds into a seperate procedure that take a combox as an argument and then call that proce for each of your comboboxes.
Heres some pseudo-code to get you started.
VB Code:
Sub main()
PopulateCombo Me.ComboBox1
PopulateCombo Me.ComboBox2
'etc
End Sub
Sub PopulateCombo(MyCombo As MSForms.ComboBox)
MyCombo.AddItem "Item1"
MyCombo.AddItem "Item2"
MyCombo.AddItem "Item3"
MyCombo.AddItem "Item4"
MyCombo.AddItem "Item5"
MyCombo.AddItem "Item6"
End Sub
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Jan 31st, 2006, 05:38 PM
#3
Thread Starter
Lively Member
Re: How to load several comboboxes with the same list
Thanks (again) DKenny - worked a treat
"Those things we must learn to do, we must learn by doing" (or hope somebody else will take pity and help out )
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
|