+ Reply to Thread
Results 1 to 7 of 7

Macro error for calendar functionality

  1. #1
    Registered User
    Join Date
    09-14-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    66

    Macro error for calendar functionality

    I am having issues with a calendar function that I have built into my Excel file (2007). In 2010 the macro OpenCalendar will not run and gets hung up on the frmCalendar.Show line of VBA code. It works fine in 2007. Did something change in 2010 that prevents it from working? If so, any thoughts on how to fix it? I have included the code for the calendar form. Any help is much appreciated.


    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Macro error for calendar functionality

    Are you running this on the same machine upgraded from 2007 to 2010? Or on a different machine with 2010?
    What controls are present on the form? Are there any non-built-in controls? What type of control is Calendar1?
    What is the error message you get when execution stops?

    There is nothing obvious in your code to cause a problem. If a form Show is causing an error I would investigate the form itself rather than the form's code, which didn't even get a chance to execute. It would be immensely helpful if you would attach your file.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-14-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Macro error for calendar functionality

    See if this works.
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Macro error for calendar functionality

    "Could not load an object because it is not available on this machine."

    You evidently have a control on the form that is not installed on the machine where you are trying to run it. Copy the definition file for the control onto the machine. Then link a reference to it.

  5. #5
    Registered User
    Join Date
    09-14-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Macro error for calendar functionality

    Thanks for the response. Can you elaborate on your answer? The macro ran just fine in 2007 without any modification.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Macro error for calendar functionality

    I ran your Sub that called Show on the form and immediately got the error that I listed. Upon trying to open your form I also got that error. The only control on the form was a Command Button, therefore there is another control that must be imported to be used.

    It ran fine on 2007 once the control was installed. If you answer my initial questions from post #2 then we can explore further.

  7. #7
    Forum Contributor
    Join Date
    06-02-2005
    Posts
    100

    Re: Macro error for calendar functionality

    I run into this all the time when supporting my old macro sheets. The MSCAL calendar control (from 2003 I believe) is no automatically installed in 2007 and 2013. You have to manually re-add it to your controls list on any machine that has the control but has since been upgraded. If it is a new excel install, you have to download the older MSCAL file and manually update your controls.

    I get my control from here:

    http://www.gmayor.com/downloads.htm
    Last edited by Ouka; 09-23-2015 at 02:29 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Calendar entry meeting in lotus notes calendar with macro
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-16-2016, 05:45 AM
  2. Replies: 3
    Last Post: 10-20-2014, 11:33 PM
  3. [SOLVED] Simple Calendar pop up macro --> error Run-time error '424': Object required
    By am_hawk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2013, 10:38 AM
  4. Calendar "like" functionality in worksheet
    By sarails in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-24-2010, 12:05 AM
  5. Adding calendar functionality into a worksheet
    By Jonsocks in forum Excel General
    Replies: 3
    Last Post: 04-22-2009, 10:51 AM
  6. Excel 2007 : Significant Loss of Functionality Error
    By Lungfish in forum Excel General
    Replies: 2
    Last Post: 03-05-2009, 07:13 AM
  7. Calendar Functionality
    By graemekoz in forum Excel General
    Replies: 6
    Last Post: 07-01-2008, 04:41 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1