Page 1 of 3 123 LastLast
Results 1 to 15 of 37
  1. #1
    Lounger
    Join Date
    Mar 2003
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calendar Control (EXCEL 2000, XP)

    I am using a calendar control, supplied by this very helpful Website. However on one specific machine when I use the control I get the following Microsoft Froms error "Could not load object because it is not available on this machine", clicking on OK to the error and the following error occurs "Method or data member not found", the debug then higlights the userform.calendar1. As this is machine specific I have re-installed Excel but this does not resolve. Does anyone have any ideas, What am I missing?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    What happened? I posted a reply to your question, only to find that the question had disappeared. Now it is back again, but with a different number. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    The Calendar control comes with Microsoft Access, so it will not be available on PC's without Access, and even on PC's that do have Access, the user may have opted not to install the Calendar control. You will have to install the Calendar control on all machines that don't have it. Re-installing Excel doesn't help since the Calendar is not part of Excel.

  3. #3
    Lounger
    Join Date
    Mar 2003
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    Thanks Hans. Some how I manage to get two of the same post so deleted one imediately but you where obviously quicker than me! <img src=/S/bash.gif border=0 alt=bash width=35 height=39>

    To install the calendar control is is simply copy the mscal.ocx file?

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    You should copy the ocx file to your Windows System32 folder,

    You will also need to register the control. You can do that from the command line using

    Regsvr32.exe path:/ mscal.ocx.

    Andrew C

  5. #5
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    I had a spreadsheet that used this calendar control and I put in this routine in the worksheet_open sub:

    CalDir = Dir("c:winntsystemmscal.ocx")
    If CalDir = "" Then
    FileCopy "[networklocation]mscal.ocx", "c:winntsystemmscal.ocx"
    End If

    This worked fine in XL97/WinNT4, but if you say it needs to be registered in later versions, would there be a way to add the registration line to this so that anyone opening the spreadsheet would automatically have the calendar installed?
    Beryl M


  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    I haven't tested this myself, but you could try<pre>Shell "Regsvr32 c:winntsystemmscal.ocx"</pre>

    You can precede it with SendKeys "{Enter}" so that the user doesn't have to click OK in the resulting message box.

  7. #7
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    Precede it? Doesn't the 'resulting' message box come up *after* it? Or am I confused in this thread as much as I (still) am in the other one ...?

    <img src=/S/sigh.gif border=0 alt=sigh width=15 height=15>
    Beryl M


  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    You use SendKeys to send keystrokes to the following instruction. If you would put SendKeys after the Shell instruction, the user would have to click OK in the message box before the SendKeys instruction would be executed.

  9. #9
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    "Ah, I see!" said the blind man to the deaf man ...

    That does, of course, make sense (your post, not the above sentence!) - pity I can't think that well ...

    <img src=/S/sigh.gif border=0 alt=sigh width=15 height=15>
    Beryl M


  10. #10
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    Regsvr32 actually has a switch (/s) to supress messages. Try

    Shell "Regsvr32 /s c:winntsystemmscal.ocx"

    Or it maybe c:winntsystem32

    Andrew

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    Much better! You can detect that I don't often use this myself...

  12. #12
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Calendar Control (EXCEL 2000, XP)

    <P ID="edit" class=small>(Edited by wdwells on 27-Feb-07 22:57. More questions added.)</P>If I understand this thread correctly you, Beryl and Andrew have provided a solution whereby it will be unnecessary for my users to have Access installed on their machine in order to use the calendar in an Excel VBA project.

    Is my understanding correct?

    I have just run the calendar program from <!post=post 316461,316461>post 316461<!/post> successfully in Excel 2003. The machine also has Access 2000 installed. Search turned up no instance of MSCAL.ocx on the machine; from this thread I came to believe MSCAL.ocx was required. Apparently there's more that I don't understand. Can you clarify things for me.

    Apologies for the long and clumsy sentence.
    Regards
    Don

  13. #13
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Calendar Control (EXCEL 2000, XP)

    Thank you Hans
    <hr>There *must* be an instance of MSCal.ocx on your PC.
    <hr>
    Which I would have found had I turned on "Look in System and Hidden folders". <img src=/S/bash.gif border=0 alt=bash width=35 height=39>
    Regards
    Don

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calendar Control (EXCEL 2000, XP)

    1) Yes, this thread describes how one can use the Microsoft Calendar Control that comes with Access on PCs that don't have Access.
    2) There *must* be an instance of MSCal.ocx on your PC.
    - Open the workbook.
    - Activate the Visual Basic Editor (Alt+F11).
    - Select Tools | References...
    - Click on the reference to Microsoft Calendar Control n.0.
    - The path to MSCal.ocx should be displayed in the lower half of the References dialog.

  15. #15
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Calendar Control (EXCEL 2000, XP)

    I am trying to use this calendar control in Excel 2003 installed on a number of users' XP machines. Many of the users do not have Admin rights and consequently cannot copy files to their C:WindowsSystem32 folder.

    Is it possible to copy the MSCAL.ocx file to another folder and achieve the desired effect?

    How would the registration command Shell ( "Regsvr32 /s c:winntsystemmscal.ocx" ) change?

    Many thanks in advance.
    Regards
    Don

Page 1 of 3 123 LastLast

Posting Permissions

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