View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default Autofill months in cell

(Untested):

Dim i As Integer
For i = 1 to 12
Range("A" & i) = CStr(Format(DateSerial(Year(Date), _
Month(DateValue("1-" & UserForm1.ComboBox1)) + i, 1), "mmmm"))
Next i

--

Vasant


"paradise" wrote in message
om...
I have a combobox in userform containing months like January,

February, March,so on. How do i write a code such that if the user

select a particular month (say January) in the combobox, it will be

written to cell A1, after which the program could autofill the months

from cell A2 downwards, reflecting February, March, and so on.?

Thanks:)