VBA: Pasted Cells Not Formatted
What formatting isn't copied (font and cell formats copy for me)?
Note that you don't need to select anything. Your macro could be
replaced with one line:
Sheets("Previous").Range("A2:B5").Copy Destination:= _
Sheets("Summary").Range("A2:B5")
Or, if you want to use Paste Special, two:
Sheets("Previous").Range("A2:B5").Copy
Sheets("Summary").Range("A2").PasteSpecial _
Paste:=xlPasteAll, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
In article ,
ajocius wrote:
When I do a paste special, the cells being pasted don't format
themselves like the cells where I did the copy from. See my structure
below:
'Select Sheet
Sheets("Previous").Select
'Select Cells
Range("A2:B5").Select
Selection.Copy
'Select Sheet
Sheets("Summary").Select
Range("A2:B5").Select
'Do Paste Special
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Again, just a novice........but love learning this VBA
Tony
|