I think this is what you need.
Might want to double check first.


VB Code:
  1. Dim i As Variant
  2. i = Time
  3. If i < "23:59:59" Then
  4.     If i < "17:00:00" Then
  5.         If i < "12:00:00" Then
  6.             If  i < "03:00:00" Then
  7.                 MsgBox "GoodEarly Early Moring"
  8.             end if            
  9.         else
  10.             MsgBox "GoodMoring"
  11.         end if
  12.      else
  13.             MsgBox "Good Afternoon"
  14.      end if
  15. else
  16.     MsgBox "Good Night"
  17. end If