+ Reply to Thread
Results 1 to 3 of 3

Where and how to open a configuration file

  1. #1
    Registered User
    Join Date
    07-14-2008
    Location
    Colombin
    Posts
    5

    Where and how to open a configuration file

    I have a VBA application which requires an additional Excel file called Configuration.xls; as the name implies, it holds info about each user. Right now, I simply open it from the same directory where the application is located. However, if I happen to move the application to another directory (or if I'm in a network environment), the application can no longer find the configuration file.

    My solution so far has been to create an additional file in the C: root directory (which everybody has for sure), namely C:\ConfigPath.xls, which points to the directory where Configuration.xls is to be found. This file is only searched if the configuration file is not found in the application directory.

    However, I'm sure there has to be a better solution (one that is not sensible to the user, for instance, erasing the file). Any ideas?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Welcome to the forum.

    You could create a key in the registry.

  3. #3
    Registered User
    Join Date
    07-14-2008
    Location
    Colombin
    Posts
    5

    No, not the Registry!

    Mmmm. Thanks for your answer. However, I'd rather create a new file in the C: root directory that mess with the Registry. Ideally, the solution should depend upon Excel itself, but no I wouldn't want to mess with the Excel startup fiel either. I guess the root file is the least painful way ...

+ 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