+ Reply to Thread
Results 1 to 10 of 10

Cannot Run Macro 'OnLoad'

  1. #1
    Registered User
    Join Date
    04-16-2010
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    5

    Cannot Run Macro 'OnLoad'

    Hey guys,

    I'm new VBA but not to programming...yet every once in a while, I find an eror that just throws me.

    I have worked through a project I'm doing for a comapny that was written by someone else and I had most of it working, but after running a short while it would throw an error -- "Cannot run macro 'OnLoad'. The macro may not be available in this workbook or all macros may be disabled."

    I have macros enabled. I have looked through as much code as I can so far and have not ONCE found a macro named "OnLoad".

    Google has no answer. Yahoo has no answer. MS Support has no answer (not surprising....).

    Hopefully you can help me...

    Thanks for anything!
    Last edited by Jaxspades; 04-19-2010 at 12:48 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Odd error

    Check in your workbook in the VBa Workbook Module

    This Workbook > Private Sub Workbook_Open()

    If there is a macro, sub or function called there that cannot be found, that is what is being referred to.

    Hope this helps.


    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.
    Last edited by Marcol; 04-16-2010 at 12:59 PM.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Odd error

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then amend your thread title accordingly. In many cases, including this one, the exact error message is a good thread title.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Odd error

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    04-16-2010
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Cannot Run Macro 'OnLoad'

    Please Login or Register  to view this content.
    No functions or subroutines, just assigning a few variables...

    Maybe in Workbook_Activate()? Idk, I'm new to VBA...its a bit different than VB. And it doesn't help me at all when I didn't create this program, ahaha.


    thank you for the help so far!!

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Cannot Run Macro 'OnLoad'

    In the VBE, do Edit > Find, and search for OnLoad with Current Project ticked.

  7. #7
    Registered User
    Join Date
    04-16-2010
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Cannot Run Macro 'OnLoad'

    It didn't find OnLoad in the entire project...why would excel say that if the project doesn't even reference it???

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Cannot Run Macro 'OnLoad'

    Do you have any add-ins installed?

  9. #9
    Registered User
    Join Date
    04-16-2010
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Cannot Run Macro 'OnLoad'

    FOUND IT!!!!

    For your future reference...

    This is custom ribbon XML. It had the problem the entire time...taht's why I couldn't find it with the vbe.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    06-30-2011
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Exclamation Re: Cannot Run Macro 'OnLoad'

    Quote Originally Posted by Jaxspades View Post
    FOUND IT!!!!

    For your future reference...

    This is custom ribbon XML. It had the problem the entire time...taht's why I couldn't find it with the vbe.

    Please Login or Register  to view this content.
    Hi. I am having the same exact problem. I tried everything listed in this string of comments, except I am having trouble with the the custom ribbon XML. I am not a programmer by any means and researched how to try the other steps. This one is stumping me though... where do I go for the XML editor? Like I said, I followed all of the other previous steps to no avail (I have no add-ins, I searched VBA, etc.). Any help is appreciated!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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