Time format set from VBA
Mike,
The macro recorder is your friend. It would give you this when you format a cell for time, hours
and minutes:
Selection.NumberFormat = "h:mm;@"
which could be changed to
Selection.NumberFormat = "h:mm"
or
Selection.NumberFormat = "hh:mm"
and then you just usually need to change the Selection to a range object that you can use with your
code so that you don't select anything.
HTH,
Bernie
MS Excel MVP
Thanks. I had checked in several places looking for just what you supplied
with no luck.
Mike
|