Option
Explicit
Public
Sub
deineRoutine()
Dim
i
As
Integer
Dim
Z
As
Integer
Dim
suchwert
As
String
For
Z = 2
To
144
showProgress
"Prozess läuft, bitte warten.."
, 2, i, 144
suchwert = Worksheets(
"Teile"
).Cells(Z, 3)
For
i = 2
To
5000
If
Worksheets(
"Daten"
).Cells(i, 14)
Like
suchwert
Then
Worksheets(
"Daten"
).Cells(i, 29) = Worksheets(
"Teile"
).Cells(Z, 2)
End
If
Next
Next
Application.StatusBar = vbNullString
End
Sub
Public
Sub
showProgress(
ByVal
sTitle
As
String
,
ByVal
lMin
As
Long
,
ByVal
lValue
As
Long
,
ByVal
lMax
As
Long
)
Dim
s
As
String
, b
As
String
Dim
d
As
Double
Dim
i
As
Integer
, j
As
Integer
s = sTitle &
" |"
d = lValue / (lMax - lMin)
i = d * 100 / 10
For
j = 1
To
i
b = b &
"-"
Next
j
b = b &
">"
For
j = 1
To
10 - i
b = b &
"*"
Next
j
s = s & b
s = s &
"| "
& Format(d,
"##0.00 %"
)
Application.StatusBar = s
End
Sub