Tone wrote...
....
>Ok, what I would like to do is have a 'configuration sheet' where I
>could include some variables like the path for certain linked
>workbooks.
>In Book1, Cell A1 = \\network_path\
>In Book1, Cell A2 <-- here I would like to know if there is a function
>(way to do it either in Excel or VBA) to 'build' the cell reference to
>the external workbook.
>
>I tried = INDIRECT(A1&"[workbook]the_sheet_name'!Cell_reference") but
>that does not seem to work - I also tried other variations but no
>luck...
>
>Basicaly I just want to be able to change one cell (A1) to change all
>links i the workbook.
....
In short, Excel make this quite difficult. INDIRECT won't work when the
references are to closed workbooks. The reason is syntactic: INDIRECT
only returns range references, but references into closed workbooks are
always returned as scalars or arrays, not ranges.
The following link discusses the known work-arounds.
http://groups-beta.google.com/group/...443753560f0075
(or
http://makeashorterlink.com/?F2993260A ). If the data you're
fetching comes from tables with column headings, the SQL.REQUEST
approach would probably be best.
Actually, another alternative would be using template link references
like
='<PATH>[filename.xls]worksheet'!$X$99
which will evaluate as errors, then use the Workbook_Open event to call
Edit > Replace, and replace <PATH> with the drive/directory path you're
fetching into cell A1.