Re: error
by Kees_B
- 4/12/12 1:18 PM
In Reply to: Error by ll4u76
I copied copied your code to a VBA-window in Word 2010, resulting in
Private Sub UserForm_Click()
Me.ComboBox1.List = Split("item 1|item 2|item 3|item 4|item 5|item 6|item 7|item 8|item 9|item 10|" & _
"item 11|item 12item 13|item 14|item 15|item 16|item 17|item 18|item 19|item 20|item 21|item 22|item 23|" & _
"item 24|item 25|item 26|item 27|item 28|item 29|item 30", "|")
End Sub
which compiled without any errors.
I don't see why it shouldn't with you.
Try a simple variant:
Me.ComboBox1.List = Split("item 1|item 2", "|")
Works with me.
Moreover, there's no need to split the text across several lines. A line in VBA can be VERY long, using the horizontal scrollbar.
Was this reply helpful? (0) (0)
Staff pick