+ Reply to Thread
Results 1 to 6 of 6

Subs in personal.xls not found

  1. #1
    Registered User
    Join Date
    03-03-2009
    Location
    Bateau Bay, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Subs in personal.xls not found

    I have a need to store a number of 'general' VBA subs in the personal.xls workbook so that they are available from multiple other workbooks. The application is a front end to a Linear program application, and users have the option of creating new scenarios, which involves copying an existing workbook to a new location. My problem is that when I move the subs to personal.xls, I get a 'Runtime error 424 - object required' and the debugger jumps to the sub which calls the sub in personal.xls It is as thought the sub is not there, or the personal.xls module is invisible for some reason, even though it is perfectly visible in the Project List, and the sub works perfectly if it is moved to the calling workbook. I thought that the personal.xls workbook was intended for such situations as this, and am at a loss. Any help gladly received.
    Last edited by VBA Noob; 03-03-2009 at 09:30 AM.

  2. #2
    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: Subs in personal.xls not found

    In the VBE, set a reference in the workbook (Tools > References) to Personal.xls.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-03-2009
    Location
    Bateau Bay, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Subs in personal.xls not found

    Thanks for the suggestion. I tried it out, but when I do that (attempt to reference Personal.xls via tools) I get an error message 'Name conflicts with existing project...' !!? I will try using a completely different workbook, kept in the root folder of the project, and referenced as you suggest.
    Last edited by alanh99; 03-03-2009 at 05:21 PM.

  4. #4
    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: Subs in personal.xls not found

    Your project in Personal.xls should have a unique name for just that reason. Mine is projPersonal.

  5. #5
    Registered User
    Join Date
    03-03-2009
    Location
    Bateau Bay, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Subs in personal.xls not found

    Reference accepted now (renamed Personal project as suggested) but original problem was still there. Have renamed sub, and removed full reference to workbook, module etc from object name, and now it works. I am still puzzled as to what the prob was, but will proceed, happlily. Thanks very much!

  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: Subs in personal.xls not found

    Don't forget to save Personal.xls.

    Would you please mark the thread as Solved?

    Click the Edit button on your first post in the thread

    Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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