Sub
test()
Dim
strProDef, arrProDef()
As
String
Dim
strAufNr, arrAufNr()
As
String
Dim
ws
As
Worksheet
Dim
i
As
Integer
Dim
ProjDef, AufNr
As
String
For
Each
ws
In
ThisWorkbook.Worksheets
If
Not
ws.Name =
"Startblatt"
And
Not
ws.Name =
"Vorlage"
Then
strAufNr = ws.Range(
"V5"
).Value
strAufNr = Replace(strAufNr,
" "
,
""
)
arrAufNr = Split(strAufNr,
","
)
strProDef = ws.Range(
"V6"
).Value
strProDef = Replace(strProDef,
" "
,
""
)
arrProDef = Split(strProDef,
","
)
For
i = LBound(arrAufNr)
To
UBound(arrAufNr)
AufNr = AufNr & arrAufNr(i) & Chr(13)
Next
For
i = LBound(arrProDef)
To
UBound(arrProDef)
ProjDef = ProjDef & arrProDef(i) & Chr(13)
Next
MsgBox
"Innenaufträge: "
& AufNr &
", Projektdefinition: "
& ProjDef
Erase
arrAufNr
Erase
arrProDef
If
(
Not
arrProDef) =
True
And
(
Not
arrAufNr) =
True
Then
MsgBox
"Arrays nicht allocated"
Else
MsgBox
"Arrays sind allocated"
End
If
End
If
Next
End
Sub