Sub 按钮1_Click()
Dim i As Integer, j As Integer, sht As Worksheet 'i,j为整数变量;sht 为excel工作表对象变量,指向某一工作表
'Dim rs As New ADODB.Recordset '定义记录集对象,保存数据表
‘工具 ---〉引用 ---〉Microsoft ActiveX data objects ....
Set cn = CreateObject(\"Adodb.Connection\")
Set rs = CreateObject(\"Adodb.Recordset\")
Dim strCn As String, strSQL As String '字符串变量