Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
=today() = weeknumber Derek M[_2_] Excel Worksheet Functions 3 November 27th 09 12:24 AM
Weeknumber of calendar date? NorTor[_4_] Excel Programming 3 December 19th 05 03:00 PM
weeknumber John Britto Excel Discussion (Misc queries) 6 October 7th 05 04:23 PM
Formula to get the current weeknumber Ludde Excel Discussion (Misc queries) 2 September 10th 05 12:17 PM
Weeknumber in Excel Gunnar From Sweden Excel Discussion (Misc queries) 1 January 5th 05 08:29 AM


All times are GMT +1. The time now is 08:40 PM.

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"