Statusanzeige trotz STEP
30.06.2005 11:05:10
Rocky
nun ist es so das ich leide in einem Beispiel mit step arbeiten muss und nun fehlt die Anzeige! warum denn das?
hier der Code:
Sub TestBar()
Dim MyTot As Long, i As Long, j As Integer
Application.ScreenUpdating = False
Sheets(1).Select
MyTot = 1000
For i = 1 To MyTot Step 4 ' Hier liegt das Problem denke ich! doch Warum?
Cells(i, 1).Copy
Cells(i, 4).Select
ActiveSheet.Paste
Application.CutCopyMode = False
StatBar i, MyTot, "Bearbeitungsstand", True
For j = 1 To 1000: Next j
Application.StatusBar = False
End Sub
Sub StatBar(MyIndex As Long, MyTotal As Long, MyText As String, InclPercent As Boolean)
Const NumBars As Integer = 30
Const FillChar As String * 1 = "0"
Const DoneChar As String * 1 = "»"
Dim PctDone As Integer, FBar As Integer, BBar As Integer, BarText As String
If MyIndex Mod CInt((MyTotal * 0.01)) <> 0 Then Exit Sub
If MyText <> Empty Then BarText = MyText & " " Else BarText = Empty
PctDone = CInt((MyIndex / MyTotal) * 100)
FBar = CInt(PctDone / 100 * NumBars)
BBar = NumBars - FBar
If InclPercent Then
BarText = BarText & " " & PctDone & " % "
End If
Application.StatusBar = BarText & Application.Rept(DoneChar, FBar) & Application.Rept(FillChar, BBar)
End Sub
Habt Ihr ne idee?
Gruß Rocky