Advertisement
YasserKhalil2019

T4720_Blinking TextBox On UserForm

Mar 29th, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. https://excel-egy.com/forum/t4720
  2. ---------------------------------
  3.  
  4. Private Sub TextBox4_AfterUpdate()
  5. Static b As Boolean
  6. Static i As Integer
  7.  
  8. With TextBox4
  9. If Not IsDate(.Text) Then Exit Sub
  10.  
  11. If CDate(.Text) = Date Then
  12. Do Until i >= 10
  13. If b Then .BackColor = vbYellow Else .BackColor = vbGreen
  14. Application.Wait Now + TimeValue("00:00:01")
  15. b = Not b
  16. i = i + 1
  17. Debug.Print i
  18. Loop
  19.  
  20. b = False: i = 0
  21. End If
  22. End With
  23. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement