‘订单生成系统.xls
‘f6-第6列,f2-第2列
Private Sub Worksheet_Activate()
On Error Resume Next
Dim x As Object, yy As Object, sql As String
Set x = CreateObject("ADODB.Connection")
x.Open "Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties='Excel 8.0;hdr=no;';Data Source=" & ActiveWorkbook.FullName
sql = "select f6,f2,f3,f4,f5,f7,f13,f24 -f25 from [sheet1$] where f24 -f25
1