Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have the following script for querytable.add, I am trying to use a variable for the path and file name under the connection property, but so far I have not been successful in that. Thanks, Zik With ActiveSheet.QueryTables.Add(Connection:= "TEXT;C:\Documents and Settings\ _ , Destination:=Range("A1")) .Name = "Viewer" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = xlWindows .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = True .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = True .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1) .Refresh BackgroundQuery:=False End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Syntax for using variables in a cell formula to reference paths/fi | Excel Worksheet Functions | |||
excel file paths | Excel Discussion (Misc queries) | |||
file paths | Excel Discussion (Misc queries) | |||
Can you use QueryTables & iqy file to post web data? | Excel Programming | |||
ActiveSheet.QueryTables.Add using a File DSN | Excel Programming |