Private
N
As
Integer
Private
Sub
Select_btn_Click()
Dim
lbl
As
Object
Dim
deselect
As
Deselect_Button
Me
.Height =
Me
.Height + 40
Me
.Logo.Top =
Me
.Logo.Top + 40
Me
.GO_btn.Top =
Me
.GO_btn.Top + 40
Me
.Backbtn.Top =
Me
.Backbtn.Top + 40
Set
lbl =
Me
.Controls.Add(
"Forms.Label.1"
,
"Selection"
& (N + 1),
True
)
With
lbl.Font
.name =
"Arial"
.Size = 16
.Bold =
True
End
With
lbl.Caption =
""
& SelectionBox.Value
lbl.Top =
Me
.SelectionBox.Top + 40 * (N + 1) + 7
lbl.Left =
Me
.SelectionBox.Left
lbl.Width =
Me
.SelectionBox.Width
lbl.Height =
Me
.SelectionBox.Height
Set
deselect.btn =
Me
.Controls.Add(
"Forms.CommandButton.1"
)
With
deselect.btn
.BackColor = &HFFFFFF
.ForeColor = &H0&
.Picture = LoadPicture(
"Beispielpfad\minus.jpg"
)
.PicturePosition = 12
End
With
With
deselect.btn.Font
.name =
"Arial"
.Size = 16
.Bold =
True
End
With
deselect.btn.Top =
Me
.Select_btn.Top + 40 * (N + 1)
deselect.btn.Left =
Me
.Select_btn.Left -
Me
.Select_btn.Height +
Me
.Select_btn.Width
deselect.btn.Width =
Me
.Select_btn.Height
deselect.btn.Height =
Me
.Select_btn.Height
N = N + 1
End
Sub