Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default linking external data

hello,

how can I link external data (from Access tables) without referring the
DataSource to a fixed path, but to the Workbook path by VBA code?

Now I refer to a fixed path (e.g. C:\P1) containing the workbook and the mdb
files and the workbook refreshes the data external links at the opening, but
if the workbook is installed in another directory the refreshment process
fails or asks parameters that confuse the user.

Emiliano


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default linking external data

On Sat, 19 Jul 2008 14:33:45 +0200, "eggpap" wrote:

hello,

how can I link external data (from Access tables) without referring the
DataSource to a fixed path, but to the Workbook path by VBA code?

Now I refer to a fixed path (e.g. C:\P1) containing the workbook and the mdb
files and the workbook refreshes the data external links at the opening, but
if the workbook is installed in another directory the refreshment process
fails or asks parameters that confuse the user.

Emiliano


Use

ThisWorkbook.Path

to get the the path to your workbook

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default linking external data

hi,

I know that statement, but I don't know how to change the data source path
programmatically.

thanks,
Emiliano

--
Se hai fretta non hai tempo
perché il tempo non ha fretta

Emiliano
"Lars-Åke Aspelin" ha scritto nel messaggio
...
On Sat, 19 Jul 2008 14:33:45 +0200, "eggpap" wrote:

hello,

how can I link external data (from Access tables) without referring the
DataSource to a fixed path, but to the Workbook path by VBA code?

Now I refer to a fixed path (e.g. C:\P1) containing the workbook and the
mdb
files and the workbook refreshes the data external links at the opening,
but
if the workbook is installed in another directory the refreshment process
fails or asks parameters that confuse the user.

Emiliano


Use

ThisWorkbook.Path

to get the the path to your workbook

Hope this helps / Lars-Åke



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking to external files Mike Excel Worksheet Functions 1 May 28th 10 04:23 PM
linking to external dbf data source DSUM formula Excel Discussion (Misc queries) 0 July 5th 06 08:59 PM
Linking from external application Crystal Thomas Cox Excel Discussion (Misc queries) 1 November 15th 05 01:17 PM
Linking to external workbook Steve Excel Programming 3 October 12th 05 03:21 AM
XP linking to external cells bug? JethroUK© New Users to Excel 3 August 19th 05 11:16 PM


All times are GMT +1. The time now is 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"