Sub 系列()
On Error GoTo 错误_Err
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Dim DB As Database
Dim RS As Recordset
Dim Va As String
Dim Strsql As String
Set DB = OpenDatabase("D:\数据库\数据库.MDB")
Set RS = DB.OpenRecordset("部品")
ING1 = Application.ActiveCell.Column
For xh = 1 To 100
If UCase(Cells(1, xh)) = "HINBAN" Or Cells(1, xh) = "型号" Or Right(Cells(1, xh), 2) = "型号" Then ing2 = xh: Exit For
Next
Next
退出:
Set RS = Nothing
Set DB = Nothing
Application.DisplayAlerts = true
Application.ScreenUpdating = true
Exit Sub
错误_Err:
MsgBox Error$
Resume 退出:
End Sub