View Single Post
 
Old 02-28-2024, 10:14 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If you are going to change the options then you should be specific about what it is you 'really' want. How long are those longer strings going to get?

If you view the VBA code in the Userform, you can edit the following macro to remove the green lines below and replace them with the three lines shown in red below.
Code:
Private Sub UserForm_Initialize()
'  Dim i As Integer
'  With Me.lbox
'    For i = 1 To 10
'      .AddItem "Option " & i
'    Next i
'  End With
  Dim sArr() As String
  sArr = Split("cat|dog|donkey|camel|draught horse and its cart", "|")
  Me.lbox.List = sArr
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote