
- VBA Tutorial
- VBA - Home
- VBA - Overview
- VBA - Excel Macros
- VBA - Excel Terms
- VBA - Macro Comments
- VBA - Message Box
- VBA - Input Box
- VBA - Variables
- VBA - Constants
- VBA - Operators
- VBA - Decisions
- VBA - Loops
- VBA - Strings
- VBA - Date and Time
- VBA - Arrays
- VBA - Functions
- VBA - Sub Procedure
- VBA - Events
- VBA - Error Handling
- VBA - Excel Objects
- VBA - Text Files
- VBA - Programming Charts
- VBA - Userforms
- VBA Useful Resources
- VBA - Quick Guide
- VBA - Useful Resources
- VBA - Discussion
VBA - 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
vba_date_time.htm
Advertisements