Read an external text-file containing LINK.xls

ElBombay

Board Regular
Joined
Aug 3, 2005
Messages
185
Hello Board,

Can this be done? I am writing a system to track sales of insurance products. The data-entry and report layouts are in one workbook. A second workbook serves as the database for the system. Individual sheets act as "tables." One sheet has all valid Broker-companies, a second tracks clients, a third the sales reps, etc. There are also several transaction tables; Pemium, Commission, etc. The first workbook links to the second and ther are several p[alces in the code where I must refer to the location of the file, such as

Workbooks.Open Filename:="\Hudson2\PsysRprts.xls"

I have tried using a GLOBAL mem-var and a single module to set or refer to this file but the name still appears many, many times in the code. The problem is that when testing or developing additions to this application, I would like to use a seperate "datbase file" It is impracticle to keep 2 versions of the code so I would like to be able to name this workbook in an external file that VBA will read. Then I wiould only have to change the file name in one palce when I wish to modify the app or experiment with it without touching operational data. I hope this is clear.

I am open to suggestions of any sort. I've never worked with FORMS but I was thinking that as an alternative to the text-filel, a form might be created where the global is set and tyhen call each of the modules that refer to that database fiel. There are currently 2 dat-entry modules and 5 reports that access this data-workbook. Thanks to all.
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,705
Messages
5,512,952
Members
408,928
Latest member
Black Vinyl

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top