返回列表 上一主題 發帖

[發問] dde匯入數值後進行複製問題

回復 4# 笨小孩
檔案上傳原則
在活頁簿內任何格式設定、公式都會影響運算速度
尤其在用了大量陣列公式時(並非只有用CTRL+SHIFT+ENTER為輸入方式)
VBA也並非就一定能提升速度
學海無涯_不恥下問

TOP

回復 7# 笨小孩


   關閉重算再執行複製
Application.Calculation = xlCalculationManual


複製完成重新設定自動重算
Application.Calculation = xlCalculationAutomatic
學海無涯_不恥下問

TOP

回復 9# 笨小孩
  1. Sub 按鈕0_Click()
  2. Application.Calculation = xlCalculationManual
  3.     For i = 1 To 26
  4.         Cells(i, "B").Value = Cells(i, "D").Value
  5.         Cells(i, "F").Value = Cells(i, "H").Value
  6.         Cells(i, "J").Value = Cells(i, "L").Value
  7.         Cells(i, "N").Value = Cells(i, "P").Value
  8.         Cells(i, "R").Value = Cells(i, "T").Value
  9.         Cells(i, "V").Value = Cells(i, "X").Value
  10.         Cells(i, "Z").Value = Cells(i, "AB").Value
  11.     Next i
  12. Application.Calculation = xlCalculationAutomatic
  13. End Sub
複製代碼
學海無涯_不恥下問

TOP

        靜思自在 : 靜坐常恩己過、閒談莫論人非。
返回列表 上一主題