Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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
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
Setting up a bi-weekly calendar event calendar help Excel Discussion (Misc queries) 2 April 30th 10 07:30 PM
how to ganerate the weekly calendar kodok New Users to Excel 1 June 20th 08 07:26 AM
Move items into weekly calendar normajmarsh Excel Programming 4 January 24th 06 02:13 PM
Weekly data into Calendar Weeks ExcelMonkey Excel Worksheet Functions 2 November 22nd 04 08:41 PM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM


All times are GMT +1. The time now is 02:51 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"