Format Msgbox - time HH:mm

  • Thread starter Thread starter Hennie Neuhoff
  • Start date Start date
H

Hennie Neuhoff

I want the messagebox to display the time formatted hh:mm
I've played around with the following, without any joy!
msgbox "The starting time is:" & Val(Range("stime")) & Format (stime,"hh:mm")
Where do I go wrong?
 
Hi,

I assume 'Stime" is a named range on the worksheet that contains a time. Try
this

MsgBox "The starting time is:" & Format(Range("Stime"), "hh:mm")

Mike
 
Make sure that your range "stime" is not several cells. If so this will not
work. So I assume stime is a singel cell:

MsgBox "The starting time is: " & Format (Range("stime").Value,"hh:mm")
 
Back
Top