vb语法有误
Option Explicit
Private Sub Command1_Click()
Dim conn As ADODB.Connection
Dim rs As ADODB.Connection
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\111\bss.mdb; Persist Security Info=False"
conn.Open
rs.Open "select * from aaa", conn, adOpenDynamic, adLockOptimistic
MsgBox "导出成功", vbOKOnly, "提示"
rs.Close
conn.Close
End Sub
Set rs = New ADODB.Recordset 系统提示“类型不匹配”
[解决办法]
Dim rs As ADODB.Connection
==>
Dim rs As ADODB.recordset
[解决办法]
同意1楼的判断。