Option
Explicit
Public
SP
As
Boolean
Public
MP
As
Boolean
Public
DS
As
Boolean
Public
SC
As
Boolean
Public
lstCol
As
New
Collection
Private
Sub
GO_btn_Click()
Me
.Hide
If
Not
(frmUI.MP
Xor
frmUI.SP
Xor
frmUI.DS
Xor
frmUI.SC)
Then
GoTo
Fehler
End
If
If
frmUI.MP
Then
frmFilter.Show
Me
.Hide
ElseIf
frmUI.SP
Then
frmFilter.Show
Me
.Hide
ElseIf
frmUI.DS
Then
DataSheets.DataSheets_show
Me
.Hide
ElseIf
frmUI.SC
Then
MsgBox
"Scatterplot was activated, but this makes no sense here."
Me
.Hide
End
If
Exit
Sub
Fehler:
MsgBox
"There is not exactly one true trigger there is something wrong. Either all of them are False or more then one are True."
End
Sub
Private
Sub
UserForm_Initialize()
Set
lstCol =
New
Collection
End
Sub
Private
Sub
Select_btn_Click()
Dim
Entry
As
New
ListEntry
lstCol.Add Entry
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
Entry.lbl =
Me
.Controls.Add(
"Forms.Label.1"
,
"Selection"
& lstCol.Count,
True
)
With
Entry.lbl.Font
.name =
"Arial"
.Size = 16
.Bold =
True
End
With
Entry.lbl.Caption =
""
& SelectionBox.Value
Entry.lbl.Top =
Me
.SelectionBox.Top + 40 * (lstCol.Count) + 7
Entry.lbl.Left =
Me
.SelectionBox.Left
Entry.lbl.Width =
Me
.SelectionBox.Width
Entry.lbl.Height =
Me
.SelectionBox.Height
Set
Entry.btn =
Me
.Controls.Add(
"Forms.CommandButton.1"
,
"Deselect"
& lstCol.Count,
True
)
Entry.Index = lstCol.Count
With
Entry.btn
.BackColor = &HFFFFFF
.ForeColor = &H0&
.Picture = LoadPicture(
"V:\GR-QKMP\AUFTRAG\Datenbanktool\Datenbanktool_VBA_Project\Sourcedata_and_Modules\Icons\minus.jpg"
)
.PicturePosition = 12
End
With
With
Entry.btn.Font
.name =
"Arial"
.Size = 16
.Bold =
True
End
With
Entry.btn.Top =
Me
.Select_btn.Top + 40 * (lstCol.Count)
Entry.btn.Left =
Me
.Select_btn.Left -
Me
.Select_btn.Height +
Me
.Select_btn.Width
Entry.btn.Width =
Me
.Select_btn.Height
Entry.btn.Height =
Me
.Select_btn.Height
Entry.btn.TakeFocusOnClick =
False
frmMaterial.GO_btn.Enabled =
True
End
Sub
Private
Sub
Backbtn_Click()
frmUI.MP =
False
frmUI.SP =
False
frmUI.DS =
False
frmUI.SC =
False
frmMaterial.Hide
frmUI.Show
End
Sub