Msgbox - Puting current date in a message box

  • Thread starter Thread starter rglasunow
  • Start date Start date
R

rglasunow

Is there a way to put the current date in a message box. I want to be
able to say hello to the user. Simular to below?

Msgbox = "Hello " & Application.Username & "."

Thanks in advance!!
 
Msgbox = "Hello " & Application.Username & ". " & Format(Date,"dd mmm yyyy")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
I tried what you both reccomended and thank you for the quick reply.
However, I keep getting the following error when using both the the
commands.

Compile Error:
Function call on the left-hand side of assignment must return Variant
or Object.

then
MsgBox = is highlighted.

I just want an ok button to appear on in the message box not a Yes, No,
Ok or Cancel command.

any sugestions?
Thanks!
 
Get rid of the = character. E.g.,

Msgbox "Hello " & Application.Username & ". " & Format(Date,"dd
mmm yyyy")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top