This code populates my UserForm’s ComboBoxes.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
The range is a list of names in random order.<o></o>
Is there a way to sort the ComboBoxes ranges ascending without sorting the source? <o></o>
<o></o>
<o></o>
<o></o>
The range is a list of names in random order.<o></o>
Is there a way to sort the ComboBoxes ranges ascending without sorting the source? <o></o>
<o></o>
Code:
[FONT=Verdana]Private Sub UserForm_Initialize()<o:p></o:p>[/FONT]
[FONT=Verdana]<o:p></o:p>[/FONT]
[FONT=Verdana]Dim X&, rng As Range<o:p></o:p>[/FONT]
[FONT=Verdana] <o:p></o:p>[/FONT]
[FONT=Verdana] With Sheet1<o:p></o:p>[/FONT]
[FONT=Verdana] <o:p></o:p>[/FONT]
[FONT=Verdana] Set rng = .Range("D3", .Cells(Rows.Count, "D").End(xlUp))<o:p></o:p>[/FONT]
[FONT=Verdana]<o:p></o:p>[/FONT]
[FONT=Verdana] ComboBox1.RowSource = "'" & .Name & "'!" & rng.Address<o:p></o:p>[/FONT]
[FONT=Verdana] ComboBox2.RowSource = "'" & .Name & "'!" & rng.Address<o:p></o:p>[/FONT]
[FONT=Verdana] ComboBox3.RowSource = "'" & .Name & "'!" & rng.Address<o:p></o:p>[/FONT]
[FONT=Verdana] ComboBox4.RowSource = "'" & .Name & "'!" & rng.Address<o:p></o:p>[/FONT]
[FONT=Verdana] <o:p></o:p>[/FONT]
[FONT=Verdana] End With<o:p></o:p>[/FONT]
[FONT=Verdana]<o:p></o:p>[/FONT]
[FONT=Verdana]End Sub<o:p></o:p>[/FONT]