|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub 导入数据()
-
- Dim u%, i%, o%
- Dim ans As Variant
- ans = MsgBox("确认保存数据并继续?", vbOKCancel + vbDefaultButton1)
- If ans = vbOK Then
- Application.Calculation = xlManual
- For o = 2 To 140
- With Worksheets(Sheets(o).Name)
- For u = 4 To 30
- For i = 3 To 33
- If .Cells(u, i) <> "" Then
- arr = Array(.Cells(i, 3), Sheets(o).Name, .Cells(2, u), .Cells(u, i))
- Worksheets("洗涤数量库").[a100000].End(3).Offset(1, 0).Resize(1, 4) = arr ‘要求对象,错误424
- End If
- Next
- Next
- End With
- Next
- End If
- Application.Calculation = xlAutomatic
- End Sub
复制代码
|
|