Private Sub Worksheet_Calculate()
If Range("Q10").Value = 1 And flag = True Then
Range("Q10").Value = 2
Application.OnTime Now + TimeValue("00:00:15"), "FFF"
End If
END SUB
'--------------------------------------------------
Sub FFF()
Application.ScreenUpdating = False
Sheets("Sheet3").Select
Range("C2:C111").Select
Selection.Copy
Range("AC2").Select
'貼上值與數字格式
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheet4.Range("Q10").Value = 1
End Sub作者: mhl9mhl9 時間: 2013-8-8 04:55
不用select sheet3,自然會停留在原處,試試以下 FFF
Sub FFF()
With Sheets("sheet3")
.Range("C2:C111").Copy
.Range("AC2").PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End With
Sheet4.Range("Q10").Value = 1
End Sub