Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating charts with VBA code Ayo Charts and Charting in Excel 2 April 8th 09 12:08 PM
Updating Source Code in Charts University Charts and Charting in Excel 0 September 19th 06 08:12 PM
vba code causes excel charts to decrease in size and become misali k2sarah Charts and Charting in Excel 1 May 27th 06 02:26 AM
VBA code to extract m-coefficient in linear trendlines from ALL charts willinusf Excel Discussion (Misc queries) 3 July 12th 05 09:54 PM
Creating organizational charts using VBA code? KitKat Excel Programming 3 April 3rd 04 12:01 AM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"