![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com