Function
EingabefktTyp4(z1, z2, x1, y1,
ParamArray
parray()
As
Variant
)
As
String
If
z1 <>
""
And
z2 <>
""
Then
If
IsArray(x1)
Or
IsArray(y1)
Then
If
IsArray(x1)
And
IsArray(y1)
Then
If
UBound(parray()) <> -1
Then
EingabefktTyp4 =
"Zu viele Parameter"
End
Else
If
x1(1) =
""
Or
y1(1) =
""
Then
EingabefktTyp4 =
"Zu wenig Parameter"
End
Else
If
x1.Count = y1.Count
Then
EingabefktTyp4 = x1(x1.Count) & y1(y1.Count)
Else
EingabefktTyp4 =
"Ranges nicht gleich groß!"
End
End
If
End
If
End
If
Else
If
IsArray(x1) =
False
Then
EingabefktTyp4 =
"x1 ist kein Rangeobject"
End
End
If
If
IsArray(y1) =
False
Then
EingabefktTyp4 =
"y1 ist kein Rangeobject"
End
End
If
EingabefktTyp4 =
"x1 und y1 müssen Range oder Einzelwert sein, Paramarray muss dabei leer gelassen werden!"
End
End
If
Else
If
x1 <>
""
And
y1 <>
""
Then
If
UBound(parray()) <> -1
Then
EingabefktTyp4 =
"zu viele Parameter"
End
Else
EingabefktTyp4 = (x1 & y1)
End
If
Else
If
x1 <>
""
Or
y1 <>
""
Then
EingabefktTyp4 =
"x1 und y1 müssen für die Verwendung von Parray beide leer sein!"
End
Else
If
UBound(parray()) <> -1
Then
If
(((UBound(parray) + 1)
Mod
(2)) = 0)
Then
EingabefktTyp4 = parray(UBound(parray()))
Else
EingabefktTyp4 =
"Parameterzahl ungerade"
End
End
If
Else
EingabefktTyp4 =
"zu wenig Werte"
End
End
If
End
If
End
If
End
If
Else
EingabefktTyp4 =
"z1 oder z2 falsch"
End
End
If
Exit
Function
EingabefktTyp4 =
"In den Feldern X1, Y1 müssen immer Werte stehen. Falls keiner eingestzt werden soll, bitte "
" verwenden!"
End
Function