Sub
Userform_Fuellen()
Dim
l_MSF_FaelleCheckBox
As
MSForms.CheckBox
Dim
l_dbl_UserFormHoehe
As
Double
Dim
l_dbl_CheckBoxausgangsposition
As
Double
Dim
g_str_alleFaelle(3)
As
String
g_str_sheet = ActiveWorkbook.ActiveSheet.Name
l_dbl_UserFormHoehe = 50
l_dbl_CheckBoxausgangsposition = 20
g_str_alleFaelle(0) =
"Fall_1"
g_str_alleFaelle(1) =
"Fall_2"
g_str_alleFaelle(2) =
"Fall_3"
g_str_alleFaelle(3) =
"Fall_4"
Load UserForm1
For
i = 0
To
UBound(g_str_alleFaelle)
Set
l_MSF_FaelleCheckBox = UserForm1.Controls.Add(
"forms.CheckBox.1"
, g_str_alleFaelle(i),
True
)
With
l_MSF_FaelleCheckBox
.Caption = g_str_alleFaelle(i)
.Height = l_dbl_CheckBoxausgangsposition
End
With
l_dbl_CheckBoxausgangsposition = l_dbl_CheckBoxausgangsposition + 40
l_dbl_UserFormHoehe = 200
UserForm1.Height = l_dbl_UserFormHoehe
Next
i
UserForm1.Show
End
Sub