Private
arrIN()
As
Variant
Private
shCount
As
Long
Private
Sub
UserForm_Initialize()
Dim
Current
As
Worksheet
Dim
i
As
Integer
Dim
a
As
Integer
Dim
k
As
Long
Dim
s
As
String
For
Each
Current
In
Worksheets
If
Current.CodeName <>
"Tabelle1"
And
Current.Name <>
"Datenbank einlesen"
And
Sheets(Current.Name).Visible =
True
Then
shCount = i
i = i + 1
End
If
Next
If
i = 0
Then
MsgBox
"Es ist keine Datenbank vorhanden!"
& Chr(13) &
"Bitte importieren sie eine Datenbank "
, vbInformation,
"Hinweiß!"
Unload UserForm1
Exit
Sub
End
If
ReDim
arrIN(shCount)
For
Each
Current
In
Worksheets
If
Current.CodeName <>
"Tabelle4"
And
Sheets(Current.Name).Visible =
True
Then
arrIN(a) = Sheets(Current.Name).Range(
"D2:D"
& Sheets(Current.Name).Cells(Rows.Count, 1).
End
(xlUp).Row)
a = a + 1
End
If
Next
ListBox1.List = arrIN(10)
End
Sub
Vielen Dank schon mal im vorraus
Herbert