Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Calendar control problems.
Hi to all,
I wrote an application for a friend who has the need to submit new customers for his job.the Main form somewhere has a button who sais:"Date".
So when u press this button it shows a calendar control and you can just select month,day,year.When you press the button "ok" a label takes this information like this 24/4/2007.The code i have written in the window with the callendar is:
Form1.lblseldate.Caption = Calendar1.Day & "/" & Calendar1.Month & "/" & Calendar1.Year
Ok,so here is the problem now:
The application is running in my pc well,and calendar also..everything ok,but when i transfer the exe to my friend's pc ,when i open the calendar and press the button "ok" i get the following error message:
Runtime error -21.....Method Year of Object ICalendar failed.
I thought to use the msgbox command to see what do i get (msgbox Calendar1.Month ),and the resault is that it shows ALWAYS 16!!!
I even installed VB6 to my friend's computer and tried to run it from there,but still get ther same error.
I cant understand why is happening this.This application works fine on my pc.