Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default How to set user defined format in VBA

Dear all,

I want to set a Column with user defined format
yyyy-mm-dd. How can I do that in VBA?

I guess the sentence should look like this : Columns("B:B").????? =
"yyyy-mm-dd"

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default How to set user defined format in VBA

Columns("B").NumberFormat = "yyyy-mm-dd"
Columns(2).NumberFormat = "yyyy-mm-dd"

Either one of those should work.

Charles Chickering

hon123456 wrote:
Dear all,

I want to set a Column with user defined format
yyyy-mm-dd. How can I do that in VBA?

I guess the sentence should look like this : Columns("B:B").????? =
"yyyy-mm-dd"

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to set user defined format in VBA

columns(2).Numberformat = "yyyy-mm-dd"

--
Regards,
Tom Ogilvy


"hon123456" wrote in message
ups.com...
Dear all,

I want to set a Column with user defined format
yyyy-mm-dd. How can I do that in VBA?

I guess the sentence should look like this : Columns("B:B").????? =
"yyyy-mm-dd"

Thanks.



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
user defined functions format df_newtovba Excel Discussion (Misc queries) 3 September 22nd 08 05:17 PM
Custom Format for User Defined Function [email protected] Excel Discussion (Misc queries) 5 August 7th 06 11:27 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
User Defined Function: Format Output Kenny Excel Programming 5 April 29th 04 11:40 PM
User-defined function with a naming format of =ABC.XYZ. Vipul S. Parekh Excel Programming 1 July 31st 03 02:44 AM


All times are GMT +1. The time now is 04:19 PM.

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"