Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following macro that was created and used by a previous user. I am
new to the organisation and the macro worked fine for him and all my other colleagues. However, this does not work for me. Sub GETdata_HT() Sheets("HT").Select ClearColumns With ActiveSheet.QueryTables.Add(Connection:=Array(Arra y( _ "ODBC;DSN=InspectionOutputDB;Description=RAISQL2;U ID=rsasso;APP=Microsoft Office 2003;WSID=DES00002;DATABASE=InspectionOutputDB;Tru sted_Con" _ ), Array("nection=Yes")), Destination:=Range("A1")) .CommandText = Array( _ "SIS_HT '" & Worksheets("TITLES").Range("B12").Value & "', '" & Worksheets ("TITLES").Range("C12").Value & "' " _ ) .Name = "HT" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .PreserveColumnInfo = True .Refresh BackgroundQuery:=False End With End Sub the .Refresh BackgroundQuery:=False is highlighted and I am at a loss as to why it works for everybody else but me. Please help. I am at my wits end. Mary. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200905/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run time error 1004 general odbc error excel 2003 vba | Excel Programming | |||
Run Time Error '1004' General ODBC Error | Excel Programming | |||
run-time error '1004' general odbc error | Excel Programming | |||
Run-time error 1004 - General ODBC Error | Excel Programming | |||
Run time error 1004, General ODBC error | New Users to Excel |