Consulting

Results 1 to 5 of 5

Thread: Solved: Problem with date Picker Control

  1. #1
    VBAX Regular
    Joined
    Dec 2006
    Posts
    38
    Location

    Solved: Problem with date Picker Control

    Hi,

    I've recently transferred all my work to a new PC with Win XP pro installed. I have a spreadsheet with a macro and form for recording the time spent on projects. The form contains the date picker. I've installed MSCOMCT2.OCX into c:\windows\system32 and run regsvr32 to register the control. Despite this I still get an error "object library invalid or contains references to object definitions that could not be found".

    When I investidated further I found that there appear to be 2 instances of MSCOMCT2 available under Toolbox -> Additional controls. One is named Unknown, the other DTPicker.

    How do I correct this please ?

    Thanks as always,

    Geoff

  2. #2
    VBAX Contributor
    Joined
    May 2010
    Location
    Sydney, NSW, Australia
    Posts
    170
    Location
    Isn't the date picker mscal.ocx? Or at least the one I use is, there are probably a few calendar controls though.

  3. #3
    VBAX Regular
    Joined
    Dec 2006
    Posts
    38
    Location
    Hi,

    See

    http://support.microsoft.com/kb/297381

    MSCOMCT2.OCX (Microsoft Windows Common Controls-2 6.0) includes the following ActiveX controls:
    Microsoft Animation Control
    Microsoft UpDown Control
    Microsoft MonthView Control
    Microsoft Date and Time Picker Control
    Microsoft Flat ScrollBar Control

    Geoff

  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    You have discovered the problem with controls that are not installed on every machine such as the calendar control.

    It creates a portability problem. Solve it by not using the calendar control.

    Click here for one example
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    VBAX Regular
    Joined
    Dec 2006
    Posts
    38
    Location
    Thanks. I'll look at your code.

    I have resolved by deleting the control from the form, then unregistering the control, reinstalling and re-registering and unmarking the control as missing.
    But your point about portability is well made.

    Thanks again,

    Geoff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •