Connection String Data source

whoiswct

New member
Joined
Nov 24, 2012
Messages
57
Reaction score
0
Points
0
Connection String Data source=Z:\myfolder\data\abc.xlsx

How to edit the connection string, so that I can connect the abc.xlsx at the current direction and ignore the physical path.
Expected connection path: Connection String Data source=abc.xlsx
I tried above, but failed.
 

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
Would it be

"Data Source=" & Thisworkbook.Path & Application.PathSeparatoor & "abc.xlsx"
 

whoiswct

New member
Joined
Nov 24, 2012
Messages
57
Reaction score
0
Points
0
Hi Bob, thanks for advice.
I tried but failed. Pls clarify if "PathSeparatoor" is typo mistake? should be "PathSeparator" ?
Anyway, I try both spelling but failed too.
pls refer to my screendump where I try to edit.
data_source.jpg
 
Top