none
Help: I need to use the MonthView control on a machine that doesn't have MSCOMCT2.ocx installed

    Question

  • I've developed a tool using VBA in Excel 2002 (XP) and I have used the Microsoft MonthView Control 6.0 (SP6).

     

    I need the workbook and attached form to work on a Windows XP machine that doesn't have MSCOMCT2.ocx installed. Due to administrator restrictions on each machine (and the resources required to update each and every machine with this file) I am unable to run as I get an "object missing" error when I run the userform.

     

    Is there any way I can use the MonthView control without having to install it on each machine.

     

    Hope someone can help...

    Tuesday, March 11, 2008 9:04 AM

Answers

  • Try a web search on "vba calendar". There's lots out there. I can't vouch for any of them (I haven't tried any), but I do suggest before you download any that you make sure they'll work with your date format (eg mm-dd-yy vs dd-mm-yy), and as most of them are downloaded in Excel format it would be wise to run a virus scan on them before opening (although that won't save you from nasty code).

     

    I've used the Calendar control successfully on a fairly tight security network. The reason I was able to is that the Calendar Control is standard with Office Professional (and also with stand-alone Access, but I think not with stand-alone Excel), and all our PCs have Office Pro licenses, so that control was already available.

     

    Another possibility might be the standard Windows MonthCalendar and DateTimePicker controls. These are system controls, so they won't be as straightforward as using Excel or Office controls. I'm sure it's possible to access them via VBA, but I've never done so and am unlikely to be able to offer much advice should you go that path.

    Thursday, March 13, 2008 7:06 AM

All replies

  • Excerpt from this:

    MonthView Control

    To use the MonthView control in your application, you must add the MSCOMCT2.OCX  file to the project. When distributing your application, install the MSCOMCT2.OCX  file in the user's Microsoft Windows System or System32 directory.

    That certainly sounds as if it has to be installed. A quick web search seems to confirm this.

     

    If all the PCs have Office installed, though, they probably all have the Calendar control. Would that serve your purpose, or are you using some functionality of MonthView that calendar doesn't have?

    NB if they are running different versions of office this can get messy, as the name of the library includes the version number, so you have to reference all the versions in your project, with higher numbered versions taking precedence, to ensure it will work on all.

    Tuesday, March 11, 2008 10:05 PM
  • Thanks for your reply Cringing Dragon.

     

    The machines that will be using this file do not have the Calender or MonthView controls installed. Do you maybe have a suggestion for a calendar style date picker that I can implement with actual VBA code rather that a control that requires installation.

     

    Thanks

    Wednesday, March 12, 2008 9:40 AM
  • Try a web search on "vba calendar". There's lots out there. I can't vouch for any of them (I haven't tried any), but I do suggest before you download any that you make sure they'll work with your date format (eg mm-dd-yy vs dd-mm-yy), and as most of them are downloaded in Excel format it would be wise to run a virus scan on them before opening (although that won't save you from nasty code).

     

    I've used the Calendar control successfully on a fairly tight security network. The reason I was able to is that the Calendar Control is standard with Office Professional (and also with stand-alone Access, but I think not with stand-alone Excel), and all our PCs have Office Pro licenses, so that control was already available.

     

    Another possibility might be the standard Windows MonthCalendar and DateTimePicker controls. These are system controls, so they won't be as straightforward as using Excel or Office controls. I'm sure it's possible to access them via VBA, but I've never done so and am unlikely to be able to offer much advice should you go that path.

    Thursday, March 13, 2008 7:06 AM