Author Topic: Use OLE to apply date format to cells?  (Read 491 times)

mark_in_atx

  • Newbie
  • *
  • Posts: 12
Use OLE to apply date format to cells?
« on: January 02, 2018, 05:21:00 am »
When I execute this:

objWB.Worksheets('Worksheet 1').Range('Q12:Q100').NumberFormat="d/m/yyyy"

It applies the number format to the range, not the date format.  How do I apply a date format to a range???

Thanks!

td

  • Tech Support
  • *****
  • Posts: 2658
    • WinBatch
Re: Use OLE to apply date format to cells?
« Reply #1 on: January 02, 2018, 06:49:44 am »
Excel stores dates as serial numbers so I am not sure what you are asking.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates