Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Format Msgbox - time HH:mm

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?
--
HJN
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Format Msgbox - time HH:mm

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

"Hennie Neuhoff" wrote:

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?
--
HJN

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Format Msgbox - time HH:mm

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")

--
Cheers,
Ryan


"Hennie Neuhoff" wrote:

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?
--
HJN

Reply
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
Format Text in MsgBox jackie Excel Programming 2 May 22nd 07 03:30 PM
MsgBox date & time skippy Excel Programming 7 April 22nd 05 08:19 PM
Format of a msgbox scottwilsonx[_72_] Excel Programming 1 November 15th 04 06:35 PM
elapsed time in msgbox Rick[_19_] Excel Programming 8 January 6th 04 08:34 PM
format values in MsgBox? NorTor Excel Programming 2 September 9th 03 02:26 PM


All times are GMT +1. The time now is 12:41 AM.

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

About Us

"It's about Microsoft Excel"