View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
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.