+ Reply to Thread
Results 1 to 4 of 4

Compile error in hidden module

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    Albuquerque
    MS-Off Ver
    Excel 2010
    Posts
    14

    Compile error in hidden module

    I've seen numerous instances of posts with this title, however, I've been unable to find a good way to handle the error...if it can be handled.

    As with the other posts, I receive the error when I have a missing reference. In my particular case, my workbook_open event opens a Login form, which assumes a 3rd party application is installed on the users workstation. Unfortunately, there are two versions of this 3rd party application, some users have the latest, some have the oldest, it all depends on the knowledge of the pc tech who built the workstation.

    I currently handle the issue with two versions of my Excel application, one using the old version of the 3rd party app, one using the new version.

    What I would like to do is have one version of the Excel application which is able to handle the existence of either the old or new version of the 3rd party app and use the version installed on the workstation. If nothing is installed, then I want to inform the user their workstation doesn't have the application and to call the help desk.

    I've tried handling the error within the workbook_open event, but it appears to be occurring prior to workbook_open.

    If anyone has a suggestion, I would appreciate a response.

    Thanks

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Compile error in hidden module

    There are probably more elegant solutions, but I handle the problem by having a STARTUP Excel file spawn the Working Excel file when the proper resources are in place. See the following non-working pseudo-code for the STARTUP Excel file:

    Please Login or Register  to view this content.
    Lewis

  3. #3
    Registered User
    Join Date
    06-04-2012
    Location
    Albuquerque
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Compile error in hidden module

    Lewis,
    Thanks for your reply. That looks like it would work, but I'm hoping to test for the existence of a particular "*.dll" used by the 3rd party app. Using the structure of your case statement, I would then "late bind" the dll. Suggestions?

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Compile error in hidden module

    I see no problem in your approach.

    I do have two suggestions you might want to implement:
    a. Add a software switch (for software testing and/or production use) that allows the user to use the OLD 3rd party application even if the new 3rd party application is available.

    b. Add provision in the software for a FUTURE 3rd pary update and/or
    replacement of the 3rd party software with your own code.

    ----------------------
    When checking for file existence, I like to use the following function (written and
    tested in Excel 2003 on a Vista 32 bit system), because it can coexist with and not
    disrupt the the Excel VBA dir() command.
    Pleae note that my initials are added to the function not to boost my ego,
    but to let me know that the function is not a 'built in' Excel Function,
    that might have the name 'FileExists().
    Please Login or Register  to view this content.
    Lewis

+ 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] Compile Error in Hidden Module and Compile Error: Can't find project or library
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-10-2013, 07:03 PM
  2. compile error in hidden module
    By Amit Chauhan in forum Excel General
    Replies: 1
    Last Post: 09-07-2012, 06:22 AM
  3. Compile Error in Hidden Module
    By Wikkie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2012, 08:44 AM
  4. Compile Error in HIdden module?
    By mitelkm in forum Excel General
    Replies: 4
    Last Post: 02-07-2008, 01:21 PM
  5. Compile error in hidden module
    By BernzG in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-19-2005, 05:04 PM

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