LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Message box question WH99 Excel Discussion (Misc queries) 5 April 5th 08 12:41 AM
Message Box Coding question Michael[_43_] Excel Programming 5 September 6th 06 10:45 PM
Simple message box question zeyneddine Excel Discussion (Misc queries) 4 August 23rd 06 06:08 PM
Message Box Question Ryan Excel Programming 4 April 21st 04 10:51 PM
message box question mark Excel Programming 4 April 8th 04 07:08 PM


All times are GMT +1. The time now is 01:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"