VBA – Minute Function

  • Post author:
  • Post category:VBA
  • Post comments:0 Comments
Minute Function

The Minute Function returns a number between 0 and 59 that represents the minute of the hour for the specified time stamp.

Syntax

Minute(time) 

Example

Add a button and add the following function.

Private Sub Constant_demo_Click()
   msgbox("Line 1: " & Minute("3:13:45 PM"))
   msgbox("Line 2: " & Minute("23:43:45"))
   msgbox("Line 3: " & Minute("2:20 PM"))
End Sub

When you execute the above function, it produces the following output.

Line 1: 13
Line 2: 43
Line 3: 20

Previous Page:-Click Here

Leave a Reply