frage zu doevents
10.09.2008 08:40:46
chris
ich hätte mal eine frage. Es geht um Doevents.
Wollte es mir heute einmal anschauen und habe dazu im Forum einen Bitrag gefunden.
https://www.herber.de/forum/archiv/904to908/t904160.htm
Jetzt wollte ich ein bichen spielen ... Und habe mir gedacht ich versuche das einmal auf das oder wie wait funtion anzuwenden.
Aber leider kommt die Sanduhr.Im Beispiel wird auch 5 sekunden gewartet und mit dem doevents ohne die Sanduhr.
Was mache ich hier falsch ?
Vielen Dank für eure Hilfe gruß Chris
Sub MeldungStatusBar()
Dim Text As String
Dim TextAlt As Variant
TextAlt = Application.StatusBar
DoEvents
Text = "Eine Meldung für 5 Sekunden!"
DoEvents
Application.StatusBar = Text
DoEvents
newHour = Hour(Now())
DoEvents
newMinute = Minute(Now())
DoEvents
newSecond = Second(Now()) + 5
DoEvents
waitTime = TimeSerial(newHour, newMinute, newSecond)
DoEvents
Application.Wait waitTime
DoEvents
If TextAlt = "FALSE" Then
Application.StatusBar = False
Else
Application.StatusBar = TextAlt
End If
End Sub