Read an external text-file containing LINK.xls

ElBombay

Board Regular
Joined
Aug 3, 2005
Messages
196
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.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,028
Messages
5,856,932
Members
431,839
Latest member
Guest user

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top