View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brian Brian is offline
external usenet poster
 
Posts: 683
Default Message Box Question

I have a User Form that has a Combo Box in it. I would like for it to greet
the user by name based on the time of day.

I have tried several variations of this code, but no luck as of yet.

Private Sub Greeting()

'Time Greeting

If Me.Engineer_2.Value = "Name" Then MsgBox

If Time < 0.5 Then Msg = "Morning" Else
If Time = 0.5 And Time < 0.75 Then Msg -"Afternoon" Else
If Time 0.75 Then Msg -"Evening"

MsgBox "Good" & Msg

End Sub


What am I doing wrong?