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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,214,632
Messages
6,120,655
Members
448,975
Latest member
sweeberry

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
Back
Top