Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is what Excel records when I record the Query as a macro using the Query
Wizard of Excel 2003: With ActiveSheet.QueryTables.Add(Connection:= _ "ODBC;DSN=Excel Files;DBQ=D:\Research 4851.xls;DefaultDir=D:;DriverId=790;MaxBufferSize= 2048;PageTimeout=5;" _ , Destination:=Range("N2")) .CommandText = Array( _ "SELECT `Discover$`.`#`, `Discover$`.`Tech Name`" & Chr(13) & "" & Chr(10) & "FROM `D:\Research 4851`.`Discover$` `Discover$`" & Chr(13) & "" & Chr(10) & "ORDER BY `Discover$`.`#`, `Discover$`.`Tech Name`" _ ) .Name = "Query from Excel Files_7" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = True .PreserveFormatting = True .RefreshOnFileOpen = True .BackgroundQuery = False .RefreshStyle = xlOverwriteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .PreserveColumnInfo = True .Refresh BackgroundQuery:=False End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 / MS Query - editing existing query to another sheet | Excel Discussion (Misc queries) | |||
Query from microsoft query- Excel 2007 | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) |