H
Hennie Neuhoff
I use a userform with a listbox. More than 50% of the time the first
option from the list will be selected by the user. I'm pretty sure I've seen
it somewhere that the first entry can be the "default" selection in which
case the user just hit enter for the selection, however I can't find it.
Any idea how this can be achieved ?
Example of userform [xl2003]
Sub KryKlaRek()
Uklarek.ListBox1.Clear
reDoCli:
Uklarek.ListBox1.RowSource = "ListClient"
Uklarek.Show
If Not bContinue Then End
With Uklarek.ListBox1
If .ListIndex = -1 Then
MsgBox "You did not select a client"
GoTo reDoCli
Exit Sub
End If
If Range("BronInlig!KlaKies").Value = 1 Then Range("broninlig!tydrek").Value
= Uklarek.ListBox1.Value
Range("broninlig!tydkla").Value = Uklarek.ListBox1.Value
End With
Unload Uklarek
Exit Sub
End Sub
option from the list will be selected by the user. I'm pretty sure I've seen
it somewhere that the first entry can be the "default" selection in which
case the user just hit enter for the selection, however I can't find it.
Any idea how this can be achieved ?
Example of userform [xl2003]
Sub KryKlaRek()
Uklarek.ListBox1.Clear
reDoCli:
Uklarek.ListBox1.RowSource = "ListClient"
Uklarek.Show
If Not bContinue Then End
With Uklarek.ListBox1
If .ListIndex = -1 Then
MsgBox "You did not select a client"
GoTo reDoCli
Exit Sub
End If
If Range("BronInlig!KlaKies").Value = 1 Then Range("broninlig!tydrek").Value
= Uklarek.ListBox1.Value
Range("broninlig!tydkla").Value = Uklarek.ListBox1.Value
End With
Unload Uklarek
Exit Sub
End Sub