各位先進
我有一個EXCEL檔和ACCESS檔 檔名都是DDE
DDE.mdb裡有個 "類股資料" 資料表 欄位有 Date, A,B,C,D,E,F,G,H,I,J
我想把EXCEL的資料更新到ACCESS理
可是一直出現 "資料表不存在"
是哪裡寫錯了嗎?
請各位先進幫我解答一下
補附上資料庫
[attach]2261[/attach]
Sub UpLago() '更新類股資料到DB
Dim mSht As Worksheet
Dim mDic1 As Scripting.Dictionary
Dim mDic2 As Scripting.Dictionary
Dim ar, mSplit, mArr(), mArr2()
Dim mKey1, mItem1, mKey2, mItem2
Dim mCon As ADODB.Connection
Dim mRst As ADODB.Recordset
Dim conStr$, mSq2$, mPath$, mFilename$, mFile$
Dim k1%, k2%, i%, s%, r%, s1%, m%
Dim mTmp$, mTmp2$
Application.ScreenUpdating = False
Set mDic1 = CreateObject("Scripting.dictionary")
Set mSht = Worksheets(6)
With mSht
ar = .Range("a3", "L" & .[a65536].End(xlUp).Row)
For i = 1 To UBound(ar)
mDic1(ar(i, 1)) = ar(i, 2) & "_" & ar(i, 3) & "_" & ar(i, 4) & "_" & ar(i, 5) & "_" & ar(i, 6) & "_" & ar(i, 7) & "_" & ar(i, 8) & "_" & ar(i, 9) & "_" & ar(i, 10) & "_" & ar(i, 11)
Next
mKey1 = mDic1.Keys
mItem1 = mDic1.Items
r = mDic1.Count