VBA – Month Function

  • Post author:
  • Post category:VBA
  • Post comments:0 Comments
Month function

The Month function returns a number between 1 and 12 that represents the month of the specified date.

Syntax

Month(date) 

Example

Add a button and add the following function.

Private Sub Constant_demo_Click()
   msgbox(Month("2013-06-30"))
End Sub

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

6

Previous Page:-Click Here

Leave a Reply