Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar Control, Weekly
I currently have a userform with a Calendar Control 10.0 on it. Righ now it only lets the user select one day at a time. I need a way fo 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 -- ForSal ----------------------------------------------------------------------- ForSale's Profile: http://www.excelforum.com/member.php...fo&userid=1189 View this thread: http://www.excelforum.com/showthread.php?threadid=56923 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Setting up a bi-weekly calendar event | Excel Discussion (Misc queries) | |||
how to ganerate the weekly calendar | New Users to Excel | |||
Move items into weekly calendar | Excel Programming | |||
Weekly data into Calendar Weeks | Excel Worksheet Functions | |||
Calendar Control: Can't exit design mode because control can't be created | Excel Programming |