Incorrect firstday in calender control.

J

Jesper

Hi

Incorrect firstday in calender control.
I don't know if this is the right group for my issue, but I think this is
closest.

I have a problem. I use Microsofts Calender control for several of my own
applications. When set firstday property to 1, which shuld result in the
first day og week is monday, the result is not not allways as expected. On
windowsplatforms running office 2003 the result is tuesday, while for those
running office 2000 the result is correct. I have seen Microsoft workaround
on a simlar issue
(http://support.microsoft.com/default.aspx?scid=kb;en-us;826761) , but I
can't use that since we run both 2000 and 2003 office platform. Futher more I
will say, that we don't have version 10 of the control, but stille have the
problem. It Apears same way on either those versions we have of calender
control, which is 8.0.0.5007 and 9.0.0.3620

The 3 senaries we have tried.
2003 and 8.0.0.5007 = error
2003 and 9.0.0.3620 = error
2000 and 9.0.0.3620 = no error

I have found 1 other user in newsgrous have the same problem (see
http://msdn.microsoft.com/newsgroup...&pt=&catlist=&dglist=&ptlist=&exp=&sloc=en-us
and view issue with title calender control). Nor he can use the workaround.

Please help us fix the issue.
 
P

Peter Huang

Hi

2003 and 8.0.0.5007 = error
2003 and 9.0.0.3620 = error

I have tried the two scenarios in both access vbe and vb6 ide, it will all
make the monday as the firstday if I set calendar0.firstday =1.

As for the calendar control 10.0, the workaround provided by KB is the only
approach.
If you have special concern, I think you may have to contact MSPSS for
request a hotfix for this issue.
You may reach MSPSS via the link below.
http://support.microsoft.com

Also I think even if with a hotfix, you may also have another concern, e.g.
you have a hotfix for mscal.ocx, you have to confirm that the end-user's
machine has applied the hotfix too.

I think you may try to detect which version calendar control in on the
current program and to write a if statment to adapt the scenario.
http://www.vbaccelerator.com/home/VB/Utilities/Type_Library_Registration_Uti
lity/Register_TypeLib_Source_Code.asp

You may try to search the key as below.
[HKEY_CLASSES_ROOT\CLSID\{8E27C92B-1264-101C-8A2F-040224009C02}]@="Calendar
Control 8.0"

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jesper

Hi Peter
2003 and 8.0.0.5007 = error
2003 and 9.0.0.3620 = error

I have tried the two scenarios in both access vbe and vb6 ide, it will all
make the monday as the firstday if I set calendar0.firstday =1.

You Are right. Sadly I used the vbMonday constant as I assumed to be 1 which
in fact is 2, and thats why the result was tuesday on off. 2003 inst.
machines. Still I have a problem, just the other way (now on the office 2000
scenaries). Will you please try to set first day of week = 1 on a office 2000
installed machine. Either versions of the mscal.ocx will set sunday as
firstday, while Off. 2003 inst. machines will return monday as first day,
with same controls.

As I see it, it doesn't help me detect the version on cal control, but the
version of office. I haven't tries scenary on a off. 2002, so I don't know
the result from there... Maybe you can tell me.
 
P

Peter Huang

Hi

Based on my test I can reproduce the problem that the code line below.
calendar.firstday =1 will set the Sunday as the firstday with calendar
8.0/9.0 on office 2000.
I have reported the problem to our product team.

Also based on my test, the calendar 11.0 shipped with office 2003 will keep
its consistent behavior on office 2000 or office 2003.
The code above will return the firstday as monday.

You may have a try and let me know if that workaround work for you.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jesper

Hi Peter

Thanks for you answer.

I have copied the five mscal.* files from a 2003 inst. macine to the
winnt/system32 on a 2000 inst. machine. I registred the ocx, made a component
reference to version 11 in my project and put it on my form. When I set
firstday = 1 I still have sunday as my first day. Either is the workaround
somehow not working for me, or I did something wrong. Any sugestions??

Jesper
 
P

Peter Huang

Hi

I have tired the calendar 11.0 both on office 2000+windows 2000 and office
2000+windows xp.
If I make the firstday =1, the first day will be both monday.

So far I think you may try to open a new project.
e.g.
1. Open a new word document
2. Alt+F11 enter VBE
3. Add a new userform
4. Add the calendar 11 control into the form and a button
5. in the button click we can try to set the firstday=1
6. run the userform and click the button
7. The Monday became the first day.

You may have a try.

If this still did not work for you.
I think you may try to detect the Office version in your code or make two
version of macro, one in the office 2000 the other in the office 2003.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top