How to set user defined format in VBA

  • Thread starter Thread starter hon123456
  • Start date Start date
H

hon123456

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.
 
Columns("B").NumberFormat = "yyyy-mm-dd"
Columns(2).NumberFormat = "yyyy-mm-dd"

Either one of those should work.

Charles Chickering
 
Back
Top