由买买提看人间百态

topics

全部话题 - 话题: mycnn
(共0页)
a********t
发帖数: 1810
1
来自主题: Statistics版 - 我这个VBA里的SQL 错哪儿了?
两张sheets,一个名子是wageclean,一个是shift.我在shift上create一个VBA,错误是:
run-time error'-2147217904(80040e10)'
Automation Error
code:
Sub Shift()

Dim mySQL As String, i As Long
Dim mycnn As ADODB.Connection
Dim rs As New ADODB.Recordset

Application.ScreenUpdating = False
myPath = ThisWorkbook.Path

'*******************connection to ODBC
Range("A1:F65536").ClearContents
Set mycnn = CreateObject("adodb.connection")
mycnn.Open ("provider=microsoft.jet.oledb.4.0;exten... 阅读全帖
(共0页)