Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
file location, defaults
Hi and thank you in advance..
I am trying to create an xls file that automatically imports from CSV on open... This works well, BUT I want to be able to duplicate this is other folders without rewriteing the script... This is part of what I have working With ActiveSheet.QueryTables.Add_ (Connection:="TEXT;F:\APPS\FVBU\zList\userlist.csv ", _ Destination:=Range("A1")) IT wont work without specifying the full path... Is there a variable that holds the path to the XLS file that is open... The VSC and XLS will always be in the same folder... Thank you.... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
file location, defaults
With ActiveSheet.QueryTables.Add_
(Connection:="TEXT;" & ThisWorkbook.Path & "\userlist.csv", _ Destination:=Range("A1")) -- Regards, Tom Ogilvy "bob" wrote in message ... Hi and thank you in advance.. I am trying to create an xls file that automatically imports from CSV on open... This works well, BUT I want to be able to duplicate this is other folders without rewriteing the script... This is part of what I have working With ActiveSheet.QueryTables.Add_ (Connection:="TEXT;F:\APPS\FVBU\zList\userlist.csv ", _ Destination:=Range("A1")) IT wont work without specifying the full path... Is there a variable that holds the path to the XLS file that is open... The VSC and XLS will always be in the same folder... Thank you.... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
file location, defaults
THANK YOU!! that's it!!!
-----Original Message----- With ActiveSheet.QueryTables.Add_ (Connection:="TEXT;" & ThisWorkbook.Path & "\userlist.csv", _ Destination:=Range("A1")) -- Regards, Tom Ogilvy "bob" wrote in message ... Hi and thank you in advance.. I am trying to create an xls file that automatically imports from CSV on open... This works well, BUT I want to be able to duplicate this is other folders without rewriteing the script... This is part of what I have working With ActiveSheet.QueryTables.Add_ (Connection:="TEXT;F:\APPS\FVBU\zList\userlist.csv ", _ Destination:=Range("A1")) IT wont work without specifying the full path... Is there a variable that holds the path to the XLS file that is open... The VSC and XLS will always be in the same folder... Thank you.... . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hyperlink .txt file defaults to Notepad. How switch to GVIM? | Excel Discussion (Misc queries) | |||
Set Defaults in File Import of a Text File | Excel Worksheet Functions | |||
Print defaults for e-mailed file | Excel Discussion (Misc queries) | |||
Subject line in email defaults to workbook file name. | Excel Discussion (Misc queries) | |||
Subject line in email defaults to workbook file name. | Excel Discussion (Misc queries) |