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

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Watch MrExcel Video

Forum statistics

Threads
1,108,727
Messages
5,524,478
Members
409,584
Latest member
RedHelp

This Week's Hot Topics

Top