Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
code interferes with function charts()
hi
i want to add a query through code in excel spreasheet. the code i a using is With ActiveSheet.QueryTables.Add(Connection:= _ "ODBC;DSN=MS Acces Database;DBQ=G:\Keyur\HFI_FE.mdb;DefaultDir=G:\" & _ "Keyur;DriverId=25;FIL=M Access;MaxBufferSize=2048;PageTimeout=5;" _ , Destination:=Range("A8")) .CommandText = Array( _ "SELECT tblCINLog.CIN, tblCINLog.Customer tblCINLog.Preform, " & _ "tblCINLog.Defect, tblCINLog.DefectiveQty, tblCINLog.Date & Chr(13) & _ "" & Chr(10) & "FROM `G:\Keyur\HFI_FE`." & _ "tblCINLog" & Chr(13) & _ "" & Chr(10) & "WHERE (tblCINLog.Date <= #" & Date & "# AND (tblCINLog.Date = #" & (Date - 30) & "#)" _ & Chr(13) & "" & Chr(10) & "ORDER BY tblCINLog.CIN") .Name = "Query from MS Access Database_1" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = True .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .PreserveColumnInfo = True .Refresh BackgroundQuery:=False End With This code for some reason doesnt lets me use chart function. Does anyone have a possible explanation and is there a way t refers to charts in another way Thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
code interferes with function charts()
sorry if you thought on this.
i am so embarrased it was such a stupid thing. i named my sub charts( so obviously... Thanks neway -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating charts with VBA code | Charts and Charting in Excel | |||
Updating Source Code in Charts | Charts and Charting in Excel | |||
vba code causes excel charts to decrease in size and become misali | Charts and Charting in Excel | |||
VBA code to extract m-coefficient in linear trendlines from ALL charts | Excel Discussion (Misc queries) | |||
Creating organizational charts using VBA code? | Excel Programming |