Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I'm trying to write a patch for a program of mine. The program uses Calendar Control 9.0 and is installed on a network drive. A copy of MSCal.OCX has been added to the same folder. The program is intended to be used by several people in the office. Unfortunately, apparently many don't have the calendar control file and/or don't have it registered. This causes an error message and causes the calendar control to disappear from the userform when the program is opened. I have successfully fixed the problem manually for one computer but it is impractical to do this for the entire office. It is uncertain how many and whom will end up using it. I'm hoping I can write a patch that will check for the calendar control and, if not found, register the file (on the network drive) and programmatically add it to the userform. I know how to use the Shell command to automatically run Regsvr32 and register the calendar control. I also know how to programmatically add a reference to the VBA Extensibility Library. However, I've been unsuccessful at programmatically adding the control to the userform. Hoping someone can help or suggest a better solution. Best regards, Greg |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I finally got it to work. I'm still interested in any better solutions than
the patch idea. This worked: With Application.VBE.ActiveVBProject.VBComponents("User form1").Designer .Controls.Add("MSCal.Calendar.7") End With Regards, Greg "Greg Wilson" wrote: Hi all, I'm trying to write a patch for a program of mine. The program uses Calendar Control 9.0 and is installed on a network drive. A copy of MSCal.OCX has been added to the same folder. The program is intended to be used by several people in the office. Unfortunately, apparently many don't have the calendar control file and/or don't have it registered. This causes an error message and causes the calendar control to disappear from the userform when the program is opened. I have successfully fixed the problem manually for one computer but it is impractical to do this for the entire office. It is uncertain how many and whom will end up using it. I'm hoping I can write a patch that will check for the calendar control and, if not found, register the file (on the network drive) and programmatically add it to the userform. I know how to use the Shell command to automatically run Regsvr32 and register the calendar control. I also know how to programmatically add a reference to the VBA Extensibility Library. However, I've been unsuccessful at programmatically adding the control to the userform. Hoping someone can help or suggest a better solution. Best regards, Greg |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had a similar problem and solved it by ditching MSCal.ocx and use the
MonthView control. This is part of the Windows Common Controls and is always present. It has the same or better features. RBS "Greg Wilson" wrote in message ... Hi all, I'm trying to write a patch for a program of mine. The program uses Calendar Control 9.0 and is installed on a network drive. A copy of MSCal.OCX has been added to the same folder. The program is intended to be used by several people in the office. Unfortunately, apparently many don't have the calendar control file and/or don't have it registered. This causes an error message and causes the calendar control to disappear from the userform when the program is opened. I have successfully fixed the problem manually for one computer but it is impractical to do this for the entire office. It is uncertain how many and whom will end up using it. I'm hoping I can write a patch that will check for the calendar control and, if not found, register the file (on the network drive) and programmatically add it to the userform. I know how to use the Shell command to automatically run Regsvr32 and register the calendar control. I also know how to programmatically add a reference to the VBA Extensibility Library. However, I've been unsuccessful at programmatically adding the control to the userform. Hoping someone can help or suggest a better solution. Best regards, Greg |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for responding. That sounds like the ticket. I'll check it out.
Best regards, Greg "RB Smissaert" wrote: I had a similar problem and solved it by ditching MSCal.ocx and use the MonthView control. This is part of the Windows Common Controls and is always present. It has the same or better features. RBS "Greg Wilson" wrote in message ... Hi all, I'm trying to write a patch for a program of mine. The program uses Calendar Control 9.0 and is installed on a network drive. A copy of MSCal.OCX has been added to the same folder. The program is intended to be used by several people in the office. Unfortunately, apparently many don't have the calendar control file and/or don't have it registered. This causes an error message and causes the calendar control to disappear from the userform when the program is opened. I have successfully fixed the problem manually for one computer but it is impractical to do this for the entire office. It is uncertain how many and whom will end up using it. I'm hoping I can write a patch that will check for the calendar control and, if not found, register the file (on the network drive) and programmatically add it to the userform. I know how to use the Shell command to automatically run Regsvr32 and register the calendar control. I also know how to programmatically add a reference to the VBA Extensibility Library. However, I've been unsuccessful at programmatically adding the control to the userform. Hoping someone can help or suggest a better solution. Best regards, Greg |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
RB Smissaert wrote
I had a similar problem and solved it by ditching MSCal.ocx and use the MonthView control. This is part of the Windows Common Controls and is always present. It has the same or better features. Where would that control be found? -- David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Enter date in userform using Calendar Control | Excel Discussion (Misc queries) | |||
Control disappeared problem - specifically, the Calendar Control | Excel Programming | |||
Control Sequence from Userform Control | Excel Programming | |||
Calendar Control: Can't exit design mode because control can't be created | Excel Programming | |||
How to use Microsoft Calendar Control 9.0 on a Userform | Excel Programming |