- ©«¤l
- 150
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 215
- ÂI¦W
- 0
- §@·~¨t²Î
- windows xp
- ³nÅ骩¥»
- sp3
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2013-7-15
- ³Ì«áµn¿ý
- 2024-10-2
|
G¤j§A¦n
¦A±N¨ç¼Æ¤½¦¡Âà¼g¬°È®É,G¤j¬O¥Î .Calculate
§Ú¬O¥[¤J,¤U±³o¤@¥yµ{¦¡½X,§Úªº¥Îªk¥¿½T¶Ü?
'pºâ¤u§@ªí,µ¥«Ýpºâµ²§ô«á,¦A¶i¦æ¤U¤@¨B
Application.Calculate 'pºâ¤u§@ªí
Do Until Application.CalculationState = xlDone
DoEvents
Loop
Sub ex()
Application.Calculation = xlCalculationManual 'pºâ¼Ò¦¡¬°¤â°Ê
With Sheets("¤ÀªR")
º¦C = .Range("º¦C")
Ä渹 = .Range("Ä渹")
§À¦C = Cells(Rows.Count, 1).End(xlUp).Row '¥Ñ¤U©¹¤W§ä³Ì«á¤@¦C¸ê®Æ
§ÀÄæ = Cells(§À¦C, Columns.Count).End(xlToLeft).Column '¥Ñ¥k©¹¥ª§ä
'¶K¤W¤½¦¡1
.Range("a" & §À¦C & ":c" & §À¦C).Copy
.Range("a" & º¦C & ":c" & §À¦C - 2).PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
'¶K¤W¤½¦¡2
.Range(Cells(§À¦C, Ä渹), Cells(§À¦C, §ÀÄæ)).Copy
.Range(Cells(º¦C, Ä渹), Cells(§À¦C - 2, §ÀÄæ)).PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
'pºâ¤u§@ªí,µ¥«Ýpºâµ²§ô«á,¦A¶i¦æ¤U¤@¨B
Application.Calculate 'pºâ¤u§@ªí
Do Until Application.CalculationState = xlDone
DoEvents
Loop
'¨ç¼Æ¤½¦¡Âà¼g¬°È
.Range("a" & º¦C & ":c" & §À¦C - 2) = .Range("a" & º¦C & ":c" & §À¦C - 2).Value
.Range(Cells(º¦C, Ä渹), Cells(§À¦C - 2, §ÀÄæ)) = .Range(Cells(º¦C, Ä渹), Cells(§À¦C - 2, §ÀÄæ)).Value
End With
Application.Calculation = xlCalculationAutomatic 'pºâ¼Ò¦¡¬°¦Û°Ê
End Sub |
|