请教老师们帮忙解释以下代码: Private Sub CommandButton1_Click() Dim xlPath$, sql$ Dim conn As ADODB.Connection Set conn = New ADODB.Connection xlPath = ThisWorkbook.FullName With conn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "Data Source=" & xlPath & ";" & _ "Extended Properties=Excel 8.0;" .Open End With sql = "Select 资材编码,'','','','','',资材名称,规格 from [0607kc$] where (资材编码 like '4%' or 资材编码 like '5%') " & _ "and not 资材编码 = any (select 资材编码 from [2F治具$])" Range("A65536").End(xlUp).Offset(1, 0).CopyFromRecordset conn.Execute(sql) End Sub 拜托了 |