; ''''
> Ajit
>
> -Original Message-
> From: excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com]
>
> On Behalf Of Mr Incredible
> Sent: Sunday, April 19, 2009 3:00 AM
> To: MS EXCEL AND VBA MACROS
> Subject: $$Excel-Macros$$ Re
@googlegroups.com]
On Behalf Of Mr Incredible
Sent: Sunday, April 19, 2009 3:00 AM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ Re: Interrogating the file name used/selected in a
query of an external CSV file
Hi,
Nearly there.
ActiveSheet.QueryTables(1).Connection returns the string &qu
Hi,
Nearly there.
ActiveSheet.QueryTables(1).Connection returns the string "TEXT;"
Is there a way just to get the file name and not the file type and
path?
Thanks
On 17 Apr, 15:09, "Ajit Navre" wrote:
> Hi there,
>
> If you have loaded the query with the Data->Import External Data->Impor
Hi there,
If you have loaded the query with the Data->Import External Data->Import
Data option then, following code would return the source file name
ActiveSheet.QueryTables(1).Connection
Then probably try to manipulate the Workbook_BeforePrint Event to include
the file name in the header or fo