View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Neil Neil is offline
external usenet poster
 
Posts: 173
Default MsgBox date & time

Skippy,

The following bit of code should do what you want, if you don't want it on
two lines, just remove the CHR(13) part from the formula.

Boxdate = Date
Boxtime = Time()
boxtext = Boxdate & Chr(13) & Boxtime
MsgBox (boxtext)

HTH

Neil
www.nwarwick.co.uk

"skippy" wrote:

am learning VB / Macros ... need a MsgBox which contains both the current
date and time ... I am able to do one or the other, but not both ... what is
the syntax?

e.g. I was able to figure out MsgBox (Time) and MsgBox (Date)
but can not figure out how to get BOTH in the MsgBox