Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Months and Dates

Hi, im looking to enter the Months of the year into a combo box, whic
is what i have done .....but can any one please help me on how to ge
the dates according to that month to show up underneath, so that i ca
have a timesheet according to the relevant month.. e.g Jan, 31 days, i
list of dates... etc etc Thankyou

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Months and Dates

Hi
see your post in Excel.misc

--
Regards
Frank Kabel
Frankfurt, Germany


Hi, im looking to enter the Months of the year into a combo box,

which
is what i have done .....but can any one please help me on how to get
the dates according to that month to show up underneath, so that i

can
have a timesheet according to the relevant month.. e.g Jan, 31 days,
in list of dates... etc etc Thankyou.


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Months and Dates

Here's some code

Private Sub ComboBox1_Change()
Dim i As Long
Dim dteCombo As Date

Range("A1:A31").ClearContents
For i = 1 To 31
dteCombo = DateSerial(Year(Date), ComboBox1.ListIndex + 1, i)
If Month(dteCombo) = ComboBox1.ListIndex + 1 Then
Cells(i, "A").Value = dteCombo
Else
Exit For
End If
Next i
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"adn4n " wrote in message
...
Hi, im looking to enter the Months of the year into a combo box, which
is what i have done .....but can any one please help me on how to get
the dates according to that month to show up underneath, so that i can
have a timesheet according to the relevant month.. e.g Jan, 31 days, in
list of dates... etc etc Thankyou.


---
Message posted from http://www.ExcelForum.com/



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
Months between two dates osaka78 Excel Discussion (Misc queries) 5 August 11th 09 08:07 AM
Months between two dates Jason K[_2_] Excel Discussion (Misc queries) 2 June 22nd 09 02:43 PM
Adding months to dates should account for 28-30-31 day months Graham Excel Worksheet Functions 3 February 1st 06 12:06 PM
Need More Help on Dates to Months Xandlyn Excel Worksheet Functions 4 March 12th 05 12:50 PM
Dates to months and calculating values for their months jigsaw2 Excel Programming 1 September 5th 03 01:35 PM


All times are GMT +1. The time now is 10:50 AM.

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"