rickincanada
Board Regular
- Joined
- Aug 31, 2010
- Messages
- 61
I am running the following code on PivotTableUpdate, however it is making Excel go into some strange sleep mode for about 5-6 seconds every time it runs. What I mean by this is that Excel is unresponsive however there is no hourglass.
Sub FormattingCopy(xSheet As Worksheet)
Application.ScreenUpdating = False
Dim xCell As Range
Const MaxRows = 100
For Each xCell In xSheet.Range("C5:C" & MaxRows)
xSheet.Cells(xCell.Row, xCell.Column - 1).Copy
xSheet.Cells(xCell.Row, xCell.Column).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Next xCell
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Any help that you can provide would be GREATLY appreciated!
Thanks,
Rick
Sub FormattingCopy(xSheet As Worksheet)
Application.ScreenUpdating = False
Dim xCell As Range
Const MaxRows = 100
For Each xCell In xSheet.Range("C5:C" & MaxRows)
xSheet.Cells(xCell.Row, xCell.Column - 1).Copy
xSheet.Cells(xCell.Row, xCell.Column).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Next xCell
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Any help that you can provide would be GREATLY appreciated!
Thanks,
Rick