Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi
I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. /Steen |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi Steen
Not that I know of On this page I have a code example that you can use to add the week number (Excel or ISO) in a cell http://www.rondebruin.nl/calendar.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Steen" wrote in message ... Hi I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. /Steen |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
I am using the Calendar Control v11, and would like to know if it could be
possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi both of you two
I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi Again
I have just taken a quick view at your suggestion, and I am not sure how to find and use this MonthView control. I am not a skilled vba programmer, but uses all the good information on your site among others. Could you please ad a little more info on how to do? "Steen" skrev: Hi both of you two I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi again
Thanks for your reply. I have been looking at your link, and it was a great instruction in how to create and use the Calendar control. But my question was actualy to have the week number on the Calendar control as in Outlook - no action added to it. Calendar control Week | Month: xxxx, Year: yyyy ------------------------------------ 12 | 01 02 03 04 05 06 07 | 13 | 08 09 10 11 12 13 14 | 14 | 15 16 17 18 19 20 21 | Hope that you still are able to help :-) "Ron de Bruin" skrev: Hi Steen Not that I know of On this page I have a code example that you can use to add the week number (Excel or ISO) in a cell http://www.rondebruin.nl/calendar.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Steen" wrote in message ... Hi I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. /Steen |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Sorry
There is no option for this in this control the way you want -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Steen" wrote in message ... Hi again Thanks for your reply. I have been looking at your link, and it was a great instruction in how to create and use the Calendar control. But my question was actualy to have the week number on the Calendar control as in Outlook - no action added to it. Calendar control Week | Month: xxxx, Year: yyyy ------------------------------------ 12 | 01 02 03 04 05 06 07 | 13 | 08 09 10 11 12 13 14 | 14 | 15 16 17 18 19 20 21 | Hope that you still are able to help :-) "Ron de Bruin" skrev: Hi Steen Not that I know of On this page I have a code example that you can use to add the week number (Excel or ISO) in a cell http://www.rondebruin.nl/calendar.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Steen" wrote in message ... Hi I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. /Steen |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Okay, it depends on where you are putting the MonthView control at....
directly on the spreadsheet or on a UserForm from within the VBA development area. From the spreadsheet ===================== If you don't already have the Visual Basic toolbar showing, click... View/Toolbars/Visual Basic on Excel's menu bar. On the toolbar that displays, there is an icon that looks like a hammer and wrench crossing each other... that is the Control Toolbox... click it and then click the same looking icon on the panel that displays (the ToolTip for it says "More Controls"). From the list box that appears, select Microsoft MonthView Control 6 (at least, it shows 6 on my system). That will place a MonthView control on the spreadsheet directly. Right click the MonthView calendar that appears and click on Properties in the popup menu that appears. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). You can use the LinkedCell property to specify the cell you want to show the selected date. On a UserControl ==================== Right click the Sheet1 tab at the bottom of the sheet and select View Code from the popup menu (or press Alt+F11) to get into the VBA editor. You can add a UserForm to your project by clicking Insert/UserForm from the VBA editor's menu bar. Right click anywhere on the Toolbox panel that comes up with the UserForm when you add it. Find Microsoft MonthView Control 6 on the list that appears and check it off. This will put the MonthView icon into the Toolbox... find the icon, click it and then drag-draw the control into the Userform. If the Properties window is not showing, right click the calendar and select Properties from the popup menu. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). Okay, that makes the MonthView control available. What you do next depends on how you want to interact with the user and what you know about how to do that. It is a little hard to guide you further at this point. Rick "Steen" wrote in message ... Hi Again I have just taken a quick view at your suggestion, and I am not sure how to find and use this MonthView control. I am not a skilled vba programmer, but uses all the good information on your site among others. Could you please ad a little more info on how to do? "Steen" skrev: Hi both of you two I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi Rick
That's just great - just what I wanted :-) I am using it in a userform almost in the way describe in http://www.rondebruin.nl/calendar.htm Will the code work for this control too? "Rick Rothstein (MVP - VB)" skrev: Okay, it depends on where you are putting the MonthView control at.... directly on the spreadsheet or on a UserForm from within the VBA development area. From the spreadsheet ===================== If you don't already have the Visual Basic toolbar showing, click... View/Toolbars/Visual Basic on Excel's menu bar. On the toolbar that displays, there is an icon that looks like a hammer and wrench crossing each other... that is the Control Toolbox... click it and then click the same looking icon on the panel that displays (the ToolTip for it says "More Controls"). From the list box that appears, select Microsoft MonthView Control 6 (at least, it shows 6 on my system). That will place a MonthView control on the spreadsheet directly. Right click the MonthView calendar that appears and click on Properties in the popup menu that appears. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). You can use the LinkedCell property to specify the cell you want to show the selected date. On a UserControl ==================== Right click the Sheet1 tab at the bottom of the sheet and select View Code from the popup menu (or press Alt+F11) to get into the VBA editor. You can add a UserForm to your project by clicking Insert/UserForm from the VBA editor's menu bar. Right click anywhere on the Toolbox panel that comes up with the UserForm when you add it. Find Microsoft MonthView Control 6 on the list that appears and check it off. This will put the MonthView icon into the Toolbox... find the icon, click it and then drag-draw the control into the Userform. If the Properties window is not showing, right click the calendar and select Properties from the popup menu. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). Okay, that makes the MonthView control available. What you do next depends on how you want to interact with the user and what you know about how to do that. It is a little hard to guide you further at this point. Rick "Steen" wrote in message ... Hi Again I have just taken a quick view at your suggestion, and I am not sure how to find and use this MonthView control. I am not a skilled vba programmer, but uses all the good information on your site among others. Could you please ad a little more info on how to do? "Steen" skrev: Hi both of you two I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi again Rick
Just a little correction - this is the code I am using for the Calendar control: http://www.fontstuff.com/vba/vbatut07.htm "Steen" skrev: Hi Rick That's just great - just what I wanted :-) I am using it in a userform almost in the way describe in http://www.rondebruin.nl/calendar.htm Will the code work for this control too? "Rick Rothstein (MVP - VB)" skrev: Okay, it depends on where you are putting the MonthView control at.... directly on the spreadsheet or on a UserForm from within the VBA development area. From the spreadsheet ===================== If you don't already have the Visual Basic toolbar showing, click... View/Toolbars/Visual Basic on Excel's menu bar. On the toolbar that displays, there is an icon that looks like a hammer and wrench crossing each other... that is the Control Toolbox... click it and then click the same looking icon on the panel that displays (the ToolTip for it says "More Controls"). From the list box that appears, select Microsoft MonthView Control 6 (at least, it shows 6 on my system). That will place a MonthView control on the spreadsheet directly. Right click the MonthView calendar that appears and click on Properties in the popup menu that appears. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). You can use the LinkedCell property to specify the cell you want to show the selected date. On a UserControl ==================== Right click the Sheet1 tab at the bottom of the sheet and select View Code from the popup menu (or press Alt+F11) to get into the VBA editor. You can add a UserForm to your project by clicking Insert/UserForm from the VBA editor's menu bar. Right click anywhere on the Toolbox panel that comes up with the UserForm when you add it. Find Microsoft MonthView Control 6 on the list that appears and check it off. This will put the MonthView icon into the Toolbox... find the icon, click it and then drag-draw the control into the Userform. If the Properties window is not showing, right click the calendar and select Properties from the popup menu. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). Okay, that makes the MonthView control available. What you do next depends on how you want to interact with the user and what you know about how to do that. It is a little hard to guide you further at this point. Rick "Steen" wrote in message ... Hi Again I have just taken a quick view at your suggestion, and I am not sure how to find and use this MonthView control. I am not a skilled vba programmer, but uses all the good information on your site among others. Could you please ad a little more info on how to do? "Steen" skrev: Hi both of you two I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
I took a quick look at the link you provided. I believe you can follow all
directions shown and you can use the MonthView control in place of the Calendar control shown there; HOWEVER, you need to make these minor modification in order for everything to work. First, after placing the MonthView control on the form, rename it to Calendar1; that way, you can use the code exactly as written. Second, the MonthView control does not have a Click event; rather, it has a DateClick event. So, you will have to change this procedure header used in the code from the link you provided... Private Sub Calendar1_Click() to this instead... Private Sub Calendar1_DateClick(ByVal DateClicked As Date) Making the two indicated changes above should (remember, I didn't test it) allow you to use the rest of the code/implementation exactly as described in the text at that link. Just so you know, the size of the MonthView control is set by the size of the font, not by dragging the sizing handles. So, to resize it, use the Font property from the Properties window. Rick "Steen" wrote in message ... Hi again Rick Just a little correction - this is the code I am using for the Calendar control: http://www.fontstuff.com/vba/vbatut07.htm "Steen" skrev: Hi Rick That's just great - just what I wanted :-) I am using it in a userform almost in the way describe in http://www.rondebruin.nl/calendar.htm Will the code work for this control too? "Rick Rothstein (MVP - VB)" skrev: Okay, it depends on where you are putting the MonthView control at.... directly on the spreadsheet or on a UserForm from within the VBA development area. From the spreadsheet ===================== If you don't already have the Visual Basic toolbar showing, click... View/Toolbars/Visual Basic on Excel's menu bar. On the toolbar that displays, there is an icon that looks like a hammer and wrench crossing each other... that is the Control Toolbox... click it and then click the same looking icon on the panel that displays (the ToolTip for it says "More Controls"). From the list box that appears, select Microsoft MonthView Control 6 (at least, it shows 6 on my system). That will place a MonthView control on the spreadsheet directly. Right click the MonthView calendar that appears and click on Properties in the popup menu that appears. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). You can use the LinkedCell property to specify the cell you want to show the selected date. On a UserControl ==================== Right click the Sheet1 tab at the bottom of the sheet and select View Code from the popup menu (or press Alt+F11) to get into the VBA editor. You can add a UserForm to your project by clicking Insert/UserForm from the VBA editor's menu bar. Right click anywhere on the Toolbox panel that comes up with the UserForm when you add it. Find Microsoft MonthView Control 6 on the list that appears and check it off. This will put the MonthView icon into the Toolbox... find the icon, click it and then drag-draw the control into the Userform. If the Properties window is not showing, right click the calendar and select Properties from the popup menu. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). Okay, that makes the MonthView control available. What you do next depends on how you want to interact with the user and what you know about how to do that. It is a little hard to guide you further at this point. Rick "Steen" wrote in message ... Hi Again I have just taken a quick view at your suggestion, and I am not sure how to find and use this MonthView control. I am not a skilled vba programmer, but uses all the good information on your site among others. Could you please ad a little more info on how to do? "Steen" skrev: Hi both of you two I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi again Rick
Thanks for the quick answer - I will try i tomorrow an let you know how it went :-) /Stony "Rick Rothstein (MVP - VB)" skrev: I took a quick look at the link you provided. I believe you can follow all directions shown and you can use the MonthView control in place of the Calendar control shown there; HOWEVER, you need to make these minor modification in order for everything to work. First, after placing the MonthView control on the form, rename it to Calendar1; that way, you can use the code exactly as written. Second, the MonthView control does not have a Click event; rather, it has a DateClick event. So, you will have to change this procedure header used in the code from the link you provided... Private Sub Calendar1_Click() to this instead... Private Sub Calendar1_DateClick(ByVal DateClicked As Date) Making the two indicated changes above should (remember, I didn't test it) allow you to use the rest of the code/implementation exactly as described in the text at that link. Just so you know, the size of the MonthView control is set by the size of the font, not by dragging the sizing handles. So, to resize it, use the Font property from the Properties window. Rick "Steen" wrote in message ... Hi again Rick Just a little correction - this is the code I am using for the Calendar control: http://www.fontstuff.com/vba/vbatut07.htm "Steen" skrev: Hi Rick That's just great - just what I wanted :-) I am using it in a userform almost in the way describe in http://www.rondebruin.nl/calendar.htm Will the code work for this control too? "Rick Rothstein (MVP - VB)" skrev: Okay, it depends on where you are putting the MonthView control at.... directly on the spreadsheet or on a UserForm from within the VBA development area. From the spreadsheet ===================== If you don't already have the Visual Basic toolbar showing, click... View/Toolbars/Visual Basic on Excel's menu bar. On the toolbar that displays, there is an icon that looks like a hammer and wrench crossing each other... that is the Control Toolbox... click it and then click the same looking icon on the panel that displays (the ToolTip for it says "More Controls"). From the list box that appears, select Microsoft MonthView Control 6 (at least, it shows 6 on my system). That will place a MonthView control on the spreadsheet directly. Right click the MonthView calendar that appears and click on Properties in the popup menu that appears. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). You can use the LinkedCell property to specify the cell you want to show the selected date. On a UserControl ==================== Right click the Sheet1 tab at the bottom of the sheet and select View Code from the popup menu (or press Alt+F11) to get into the VBA editor. You can add a UserForm to your project by clicking Insert/UserForm from the VBA editor's menu bar. Right click anywhere on the Toolbox panel that comes up with the UserForm when you add it. Find Microsoft MonthView Control 6 on the list that appears and check it off. This will put the MonthView icon into the Toolbox... find the icon, click it and then drag-draw the control into the Userform. If the Properties window is not showing, right click the calendar and select Properties from the popup menu. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). Okay, that makes the MonthView control available. What you do next depends on how you want to interact with the user and what you know about how to do that. It is a little hard to guide you further at this point. Rick "Steen" wrote in message ... Hi Again I have just taken a quick view at your suggestion, and I am not sure how to find and use this MonthView control. I am not a skilled vba programmer, but uses all the good information on your site among others. Could you please ad a little more info on how to do? "Steen" skrev: Hi both of you two I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#13
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar with weeknumber?
Hi again Rick
Thanks - it works nice. But I have got a small problem - I can't call it from another module/sheet with: Call OpenCalendar Is that because it's defined in the Prival.xls "Steen" wrote: Hi again Rick Thanks for the quick answer - I will try i tomorrow an let you know how it went :-) /Stony "Rick Rothstein (MVP - VB)" skrev: I took a quick look at the link you provided. I believe you can follow all directions shown and you can use the MonthView control in place of the Calendar control shown there; HOWEVER, you need to make these minor modification in order for everything to work. First, after placing the MonthView control on the form, rename it to Calendar1; that way, you can use the code exactly as written. Second, the MonthView control does not have a Click event; rather, it has a DateClick event. So, you will have to change this procedure header used in the code from the link you provided... Private Sub Calendar1_Click() to this instead... Private Sub Calendar1_DateClick(ByVal DateClicked As Date) Making the two indicated changes above should (remember, I didn't test it) allow you to use the rest of the code/implementation exactly as described in the text at that link. Just so you know, the size of the MonthView control is set by the size of the font, not by dragging the sizing handles. So, to resize it, use the Font property from the Properties window. Rick "Steen" wrote in message ... Hi again Rick Just a little correction - this is the code I am using for the Calendar control: http://www.fontstuff.com/vba/vbatut07.htm "Steen" skrev: Hi Rick That's just great - just what I wanted :-) I am using it in a userform almost in the way describe in http://www.rondebruin.nl/calendar.htm Will the code work for this control too? "Rick Rothstein (MVP - VB)" skrev: Okay, it depends on where you are putting the MonthView control at.... directly on the spreadsheet or on a UserForm from within the VBA development area. From the spreadsheet ===================== If you don't already have the Visual Basic toolbar showing, click... View/Toolbars/Visual Basic on Excel's menu bar. On the toolbar that displays, there is an icon that looks like a hammer and wrench crossing each other... that is the Control Toolbox... click it and then click the same looking icon on the panel that displays (the ToolTip for it says "More Controls"). From the list box that appears, select Microsoft MonthView Control 6 (at least, it shows 6 on my system). That will place a MonthView control on the spreadsheet directly. Right click the MonthView calendar that appears and click on Properties in the popup menu that appears. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). You can use the LinkedCell property to specify the cell you want to show the selected date. On a UserControl ==================== Right click the Sheet1 tab at the bottom of the sheet and select View Code from the popup menu (or press Alt+F11) to get into the VBA editor. You can add a UserForm to your project by clicking Insert/UserForm from the VBA editor's menu bar. Right click anywhere on the Toolbox panel that comes up with the UserForm when you add it. Find Microsoft MonthView Control 6 on the list that appears and check it off. This will put the MonthView icon into the Toolbox... find the icon, click it and then drag-draw the control into the Userform. If the Properties window is not showing, right click the calendar and select Properties from the popup menu. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). Okay, that makes the MonthView control available. What you do next depends on how you want to interact with the user and what you know about how to do that. It is a little hard to guide you further at this point. Rick "Steen" wrote in message ... Hi Again I have just taken a quick view at your suggestion, and I am not sure how to find and use this MonthView control. I am not a skilled vba programmer, but uses all the good information on your site among others. Could you please ad a little more info on how to do? "Steen" skrev: Hi both of you two I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick |
#14
Posted to microsoft.public.excel.programming
|
|||
|
|||
week numbering in Outlook 2007
I use the week number, as you have outlined, in Outlook 2007. I just noticed that it is off a week this year, due to 53 weeks last year. When I check the ISO convention, MS has definitely programming wrong: this week, which is KW 13 in Outlook, should be KW12 ISO.
Howdo we fix this? Rick Rothstein \(MVP - VB\) wrote: If you use a MonthView control instead, it has a ShowWeekNumbers property that 13-Sep-07 If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick Previous Posts In This Thread: On Thursday, September 13, 2007 4:22 PM Stee wrote: Calendar with weeknumber? Hi I am using the Calendar Control v11, and would like to know if it could be possible to display the weeknumber in it as is the case in OutLook. /Steen On Thursday, September 13, 2007 4:47 PM Ron de Bruin wrote: Hi SteenNot that I know ofOn this page I have a code example that you can use Hi Steen Not that I know of On this page I have a code example that you can use to add the week number (Excel or ISO) in a cell http://www.rondebruin.nl/calendar.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Steen" wrote in message ... On Thursday, September 13, 2007 5:19 PM Rick Rothstein \(MVP - VB\) wrote: If you use a MonthView control instead, it has a ShowWeekNumbers property that If you use a MonthView control instead, it has a ShowWeekNumbers property that can be set to True in order to display the week numbers. Rick On Tuesday, October 02, 2007 11:40 AM Stee wrote: Hi both of you twoI sorry that I first am back now - I havn't had time yet to Hi both of you two I sorry that I first am back now - I havn't had time yet to test the two suggestions, but I will do that in the weekend and come back. /Stony "Rick Rothstein (MVP - VB)" skrev: On Tuesday, October 02, 2007 4:08 PM Stee wrote: Hi AgainI have just taken a quick view at your suggestion, and I am not sure Hi Again I have just taken a quick view at your suggestion, and I am not sure how to find and use this MonthView control. I am not a skilled vba programmer, but uses all the good information on your site among others. Could you please ad a little more info on how to do? "Steen" skrev: On Tuesday, October 02, 2007 4:19 PM Stee wrote: Hi againThanks for your reply. Hi again Thanks for your reply. I have been looking at your link, and it was a great instruction in how to create and use the Calendar control. But my question was actualy to have the week number on the Calendar control as in Outlook - no action added to it. Calendar control Week | Month: xxxx, Year: yyyy ------------------------------------ 12 | 01 02 03 04 05 06 07 | 13 | 08 09 10 11 12 13 14 | 14 | 15 16 17 18 19 20 21 | Hope that you still are able to help :-) "Ron de Bruin" skrev: On Tuesday, October 02, 2007 4:41 PM Ron de Bruin wrote: SorryThere is no option for this in this control the way you want-- Regards Sorry There is no option for this in this control the way you want -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm On Tuesday, October 02, 2007 5:20 PM Rick Rothstein \(MVP - VB\) wrote: Okay, it depends on where you are putting the MonthView control at.... Okay, it depends on where you are putting the MonthView control at.... directly on the spreadsheet or on a UserForm from within the VBA development area. From the spreadsheet ===================== If you don't already have the Visual Basic toolbar showing, click... View/Toolbars/Visual Basic on Excel's menu bar. On the toolbar that displays, there is an icon that looks like a hammer and wrench crossing each other... that is the Control Toolbox... click it and then click the same looking icon on the panel that displays (the ToolTip for it says "More Controls"). From the list box that appears, select Microsoft MonthView Control 6 (at least, it shows 6 on my system). That will place a MonthView control on the spreadsheet directly. Right click the MonthView calendar that appears and click on Properties in the popup menu that appears. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). You can use the LinkedCell property to specify the cell you want to show the selected date. On a UserControl ==================== Right click the Sheet1 tab at the bottom of the sheet and select View Code from the popup menu (or press Alt+F11) to get into the VBA editor. You can add a UserForm to your project by clicking Insert/UserForm from the VBA editor's menu bar. Right click anywhere on the Toolbox panel that comes up with the UserForm when you add it. Find Microsoft MonthView Control 6 on the list that appears and check it off. This will put the MonthView icon into the Toolbox... find the icon, click it and then drag-draw the control into the Userform. If the Properties window is not showing, right click the calendar and select Properties from the popup menu. Set the ShowWeekNumbers property to True to show the week numbers on the calendar. You might have to change the TitleBackColor property in order to make the numbers easier to see (depending on the theme setting for your copy of Windows). Okay, that makes the MonthView control available. What you do next depends on how you want to interact with the user and what you know about how to do that. It is a little hard to guide you further at this point. Rick "Steen" wrote in message ... On Wednesday, October 03, 2007 2:20 PM Stee wrote: Calendar with weeknumber? Hi Rick That's just great - just what I wanted :-) I am using it in a userform almost in the way describe in http://www.rondebruin.nl/calendar.htm Will the code work for this control too? "Rick Rothstein (MVP - VB)" skrev: On Wednesday, October 03, 2007 2:23 PM Stee wrote: Hi again RickJust a little correction - this is the code I am using for the Hi again Rick Just a little correction - this is the code I am using for the Calendar control: http://www.fontstuff.com/vba/vbatut07.htm "Steen" skrev: On Wednesday, October 03, 2007 3:04 PM Rick Rothstein \(MVP - VB\) wrote: I took a quick look at the link you provided. I took a quick look at the link you provided. I believe you can follow all directions shown and you can use the MonthView control in place of the Calendar control shown there; HOWEVER, you need to make these minor modification in order for everything to work. First, after placing the MonthView control on the form, rename it to Calendar1; that way, you can use the code exactly as written. Second, the MonthView control does not have a Click event; rather, it has a DateClick event. So, you will have to change this procedure header used in the code from the link you provided... Private Sub Calendar1_Click() to this instead... Private Sub Calendar1_DateClick(ByVal DateClicked As Date) Making the two indicated changes above should (remember, I didn't test it) allow you to use the rest of the code/implementation exactly as described in the text at that link. Just so you know, the size of the MonthView control is set by the size of the font, not by dragging the sizing handles. So, to resize it, use the Font property from the Properties window. Rick "Steen" wrote in message ... On Wednesday, October 03, 2007 3:26 PM Stee wrote: Hi again RickThanks for the quick answer - I will try i tomorrow an let you Hi again Rick Thanks for the quick answer - I will try i tomorrow an let you know how it went :-) /Stony "Rick Rothstein (MVP - VB)" skrev: On Friday, October 05, 2007 10:41 AM Stee wrote: Hi again RickThanks - it works nice. Hi again Rick Thanks - it works nice. But I have got a small problem - I can't call it from another module/sheet with: Call OpenCalendar Is that because it's defined in the Prival.xls "Steen" wrote: Submitted via EggHeadCafe - Software Developer Portal of Choice WPF Circular Progress Indicator http://www.eggheadcafe.com/tutorials...gress-ind.aspx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=today() = weeknumber | Excel Worksheet Functions | |||
Weeknumber of calendar date? | Excel Programming | |||
weeknumber | Excel Discussion (Misc queries) | |||
Formula to get the current weeknumber | Excel Discussion (Misc queries) | |||
Weeknumber in Excel | Excel Discussion (Misc queries) |