TimeFmtType Property

The TimeFmtType property returns or sets the time formatting in the worksheet.

Syntax

object.TimeFmtType

object.TimeFmtType = TimeType

Parameter

Type

Description

TimeType

wksTimeFmtType

required; time format

Example 1

This example shows how to set the time format for a cell.

'Sets the time format to h:mm such as: 14:45

WksRange.Format.TimeFmtType = wksTimeFmt_H_MM

Example 2

This example shows how to return the date format for a cell to the Immediate Pane.

'Returns the numeric time format to the Immediate Pane

Debug.Print WksRange.Format.TimeFmtType

Used by: WksCellFormat object