Option
Explicit
Private
Sub
ListBox1_DblClick(
ByVal
Cancel
As
MSForms.ReturnBoolean)
If
ListBox1.ListIndex = -1
Then
Exit
Sub
If
sWert =
"%"
Then
ActiveCell.Value = ListBox1.List(ListBox1.ListIndex) / 100
Else
ActiveCell.Value = ListBox1.List(ListBox1.ListIndex)
End
If
Unload
Me
End
Sub
Private
Sub
UserForm_Initialize()
ListBox1.ColumnCount = 1
ListBox1.ColumnWidths =
"50"
Select
Case
sWert
Case
"STERNE"
: ListBox1.List = Array(
"0"
,
"1"
,
"2"
,
"3"
)
Case
"%"
Dim
i&, str(0
To
100)
For
i = LBound(str)
To
UBound(str)
ListBox1.AddItem i
Next
ListBox1.AddItem
""
, 0
End
Select
End
Sub