Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default Format VB command


x = "2:01"

debug.print format (x,"0# ##")

I get 00 00

Shouldn't this return

02 01 ??

Thanks - Kirk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Format VB command

Hi,

x is representing time so use

format("2:01","hh mm")

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"kirkm" wrote in message
...

x = "2:01"

debug.print format (x,"0# ##")

I get 00 00

Shouldn't this return

02 01 ??

Thanks - Kirk


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Format VB command

Kirk,

What is "2:01" a time?

if so

Debug.Print Format(x, "hh:mm")
returns 02:01

Debug.Print Format(x, "hh mm")
returns 02 01

Mike


"kirkm" wrote:


x = "2:01"

debug.print format (x,"0# ##")

I get 00 00

Shouldn't this return

02 01 ??

Thanks - Kirk

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default Format VB command

Thanks Mike & Andy.

Sanity restored!

Cheers - Kirk
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 the command for the Currency button Murray[_3_] Excel Discussion (Misc queries) 4 July 30th 08 08:37 PM
Format Cell command will not function Phil Excel Discussion (Misc queries) 1 January 24th 08 03:47 PM
Format command Ailish Excel Programming 1 January 27th 05 04:20 PM
DDE Command to Format Cell Lynn Schauer Excel Programming 1 July 11th 03 02:10 PM
DDE Command to Format Cell jaf Excel Programming 1 July 9th 03 05:10 PM


All times are GMT +1. The time now is 01:16 PM.

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

About Us

"It's about Microsoft Excel"