Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Autofill months in cell

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:)
  #2   Report Post  
Posted to microsoft.public.excel.programming
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:)



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofill Months Caz Excel Discussion (Misc queries) 7 March 23rd 10 12:31 PM
AutoFill a cell with a value N1KO Excel Discussion (Misc queries) 1 March 30th 09 11:45 AM
Can autofill, as in months or dates, go to the end of the spreads Mary jane Excel Worksheet Functions 4 January 2nd 07 06:38 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
AutoFill Visible Cells with Months Elaine New Users to Excel 3 March 16th 05 10:13 PM


All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"