Selected Answer
Hi again Ali
I don't have much time but try the first attached file which has this code:
Option Base 1
Private Sub UserForm_Activate()
Dim MonthName As Variant
MonthName = Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
Dim i As Integer
'For i = 1 To 1
'Me.ComboBox1.AddItem Format(MonthName, "mmm-yy")
'MonthName = DateAdd("m", 1, MonthName)
' add 12 English months from position in the array
For i = 1 To 12
Me.ComboBox1.AddItem MonthName(i)
Next
End Sub
You should search the internet to see why I added "Option Base 1".
Hope this works well for you.
Revision #1 19 November 2024
The second attached file addresses the additional requirement from the user (see Discussion below) to add the last two digits of the current year to the Englisg three-letter month. It uses a new variable Yr to capture the former. Changes to the code above are shoiwn in bold:
Private Sub UserForm_Activate()
Dim MonthName As Variant
Dim Yr As Long
MonthName = Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
' get last 2 digits of current year
Yr = Right(Year(Date), 2)
Dim i As Integer
' add 12 English months from position in the array
For i = 1 To 12
' append current year to month
Me.ComboBox1.AddItem MonthName(i) & "-" & Yr
Next
End Sub
If this works for you, please remember to mark this Answer as Selected.