+ Reply to Thread
Results 1 to 2 of 2

Calendar Control, Weekly

  1. #1
    Registered User
    Join Date
    07-16-2004
    Posts
    56

    Calendar Control, Weekly

    I currently have a userform with a Calendar Control 10.0 on it. Right now it only lets the user select one day at a time. I need a way for the user to select a week at a time (Mon-Sun).

    What is the best method? Can I continue to use the Calendar Control? Should I make a different userform with a listbox or combobox?

    Thanks.

  2. #2
    Mike Fogleman
    Guest

    Re: Calendar Control, Weekly

    You can still use the Calendar control, but you will have to build the week
    using VB or cell formulas. Let's assume your user picks Wed, Aug 9, 2006 on
    the calendar. That date is then placed in A20. Put the days of the week in
    cells B19:H19, starting with monday. In cell B20 put this formula:
    =IF(WEEKDAY(A20,2)=1,A20,A20-(WEEKDAY(A20,2)-1))
    in cell C20 put: =B20+1
    in cell D20 put: =C20+1
    in cell E20 put: =D20+1
    in cell F20 put: =E20+1
    in cell G20 put: =F20+1
    in cell H20 put: =G20+1

    Your formulas create a week that starts on Monday 8/7/2006 and ends Sunday
    8/13/2006
    No matter what day of the week the user selected. Works for any week.

    Mike F

    "ForSale" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I currently have a userform with a Calendar Control 10.0 on it. Right
    > now it only lets the user select one day at a time. I need a way for
    > the user to select a week at a time (Mon-Sun).
    >
    > What is the best method? Can I continue to use the Calendar Control?
    > Should I make a different userform with a listbox or combobox?
    >
    > Thanks.
    >
    >
    > --
    > ForSale
    > ------------------------------------------------------------------------
    > ForSale's Profile:
    > http://www.excelforum.com/member.php...o&userid=11896
    > View this thread: http://www.excelforum.com/showthread...hreadid=569235
    >




+ 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