Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a problem, I try the next code:
Dim SQLString As String SQLString is a Select... With ActiveSheet.QueryTables.Add(Connection:= _ "ODBC;DRIVER=SQL Server;SERVER=MAQUETA;UID=marta;PWD=;APP=Microsoft ® Query;WSID=MARTA;DATABASE=CONFIGURACION " _ , Destination:=Range("A9")) .CommandText = SQLString .Name = "Consulta desde SQLConfiguracion" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = False .RefreshStyle = xlOverwriteCells .SavePassword = True .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .PreserveColumnInfo = False .Refresh End With If I execute step by step this code, I obtain result about the query, but if I execute normaly, I don`t obtain data. Please Could somebody help me? Thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error when trying to use QueryTables.Add | Excel Programming | |||
QueryTables Error | Excel Programming | |||
With ActiveSheet.QueryTables.Add | Excel Programming | |||
QueryTables Interrupt if URL is Down | Excel Programming |