Private
Sub
CB_EBENE_3_Click()
Dim
i
As
Integer
Dim
Schalter
As
String
Dim
Fso, strV
Dim
Anzahl
As
Integer
Dim
ZAEHLER
As
Integer
Dim
max
As
Integer
Dim
HV
As
String
Dim
UV2
As
Variant
Dim
UV3
As
Variant
Dim
EB
As
String
Dim
xEBENE2
As
String
i = 0
Set
Fso = CreateObject(
"Scripting.FileSystemObject"
)
LW = TB_DEF_LW.Value
HV = TB_EBENE_1.Value
For
Each
ctrl_1
In
Me
.Frame2.Controls
If
TypeOf
ctrl_1
Is
MSForms.CheckBox
Then
OB_NAME2 = ctrl_1.Name
OB_EIGENSCHAFT = ctrl_1.Value
For
Each
ctrl_2
In
Me
.Frame3.Controls
If
TypeOf
ctrl_2
Is
MSForms.CheckBox
Then
OB_NAME3 = ctrl_2.Name
OB_EIGENSCHAFT2 = ctrl_2.Value
xEBENE2 =
"TB_EBENE_"
& Right(OB_NAME2, Len(OB_NAME2) - 2)
xEBENE3 =
"TB_EBENE_"
& Right(OB_NAME3, Len(OB_NAME3) - 2)
UV2 = Controls(xEBENE2).Value
UV3 = Controls(xEBENE3).Value
sDir = LW &
"\" & HV & "
\
" & UV2 & "
\" & UV3
i = i + Abs(ctrl_2.Value)
If
OB_EIGENSCHAFT =
True
Then
If
Fso.FolderExists(sDir) =
True
Then
MsgBox sDir &
" existiert bereits"
Else
MkDir sDir
MsgBox sDir &
" wurde angelegt"
End
If
End
If
End
If
Next
ctrl_2
End
If
Next
ctrl_1
End
Sub