+ Reply to Thread
Results 1 to 3 of 3

Preselected month should be filled out automatically.

  1. #1
    Registered User
    Join Date
    09-15-2006
    Posts
    13

    Preselected month should be filled out automatically.

    Hi,

    I have a sheet where I've inserted a list with months. I would like to set it up so that upon selecting a certain month, it fills out all days of that month somewhere else in the same sheet.

    I hope this is enough of an explanation for people to be able to help me.

    Kind regards,

    Zjak

  2. #2
    Forum Contributor
    Join Date
    12-12-2005
    Posts
    667
    This should help:
    Sub LastMonthDate()
    For i = 1 To 12
    Cells(i, 1) = Choose(Month(DateSerial(2006, i, 1)), "Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec")
    LD = Day(DateSerial(2006, i + 1, 0))
    For j = 1 To LD
    Cells(i, 1 + j) = j
    Next
    Next
    End Sub
    Best regards,

    Ray

  3. #3
    Registered User
    Join Date
    09-15-2006
    Posts
    13
    First of all, thanks for the quick reply.

    Unfortunately it ain't exactly what I was looking for. I want to have all the dates of a certain month (so far your answer was excellent), but it would be for only one (preselected) month. Ideally, the dates given would change if the user would select a different month from the scrolldown menu I created.

    I can PM you a screenie if that would help you with this problem. Eventhough I did take a VB for Excel course, I'm still quite inexperienced.

    Regards,
    Zjak

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1