Populate Months in drop down

How do I populate a drop down as follows:

1-January
2-February
3-March
etc.

Currently I have:
            'Pop month
            For i = 1 To 12
                cboMonth.Items.Add(i & "-" & Format(Now.AddMonths(i - 4), "MMMM"))
                cboMonth.Items.FindByText(i & "-" & Format(Now.AddMonths(i - 4), "MMMM")).Value = i
            Next

But ofcourse this is wrong. Thanks
wilcor14Asked:
Who is Participating?
 
Jai SConnect With a Mentor Tech ArchCommented:
the prev example will show you jan,feb etc..
this one will give you the full monthname
        For i = 1 To 12
            ComboBox1.Items.Add(i & "-" & MonthName(i, False))
        Next
0
 
Jai STech ArchCommented:
       For i = 1 To 12
            ComboBox1.Items.Add(i & "-" & MonthName(i, True))
        Next
0
 
wilcor14Author Commented:
Thanks jaiganeshsrinivasan for you time. It works perfectly.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.