View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter Bassett Peter Bassett is offline
external usenet poster
 
Posts: 1
Default Copy/Paste Merged Cells via Macro is not working


I have 6 rows (from R4-R9) that include merged cells that I need to copy
in the sheet over and over in a loop. When I manually copy, it works
fine. My problem is that although the Macro below copies the 6 rows,
none of the merged cells are maintained! All the cells are individual. I
thought PasteFormats maintains the merged cell layout.


' Copy 6 rows
Rows("4:9").Select
Range("C4:C9").Activate
Selection.Copy
Rows(NewRow & ":" & NewRow + 5).Select
Range("C" & NewRow & ":C" & NewRow + 5).Activate
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
<<<<

Any tips on maintaining the Merged Cell formatting in VB?

Thanks,
Pete



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!