ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copying all of a row & Attributes (https://www.excelbanter.com/excel-programming/366004-copying-all-row-attributes.html)

RjS, CISSP

copying all of a row & Attributes
 
Hi - I hope this question isnt too newbie. I am trying to copy all of a row,
including all of its attributes like formatting, column widths, etc. The code
snippet that I am currently using to perform the copy is:

wsDST.Rows(DstRow).Value = wsSRC.Rows(SrcRow).Value

This, of course, works for just the cell values. But trying to modify the
above to include the other desired attributes has eluded me.

Thanks Much

Chip Pearson

copying all of a row & Attributes
 
Try something like

wsSRC.Rows(SrcRow).Copy Destination:=wsDST.Rows(DstRow).Value

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"RjS, CISSP" wrote in
message
...
Hi - I hope this question isnt too newbie. I am trying to copy
all of a row,
including all of its attributes like formatting, column widths,
etc. The code
snippet that I am currently using to perform the copy is:

wsDST.Rows(DstRow).Value = wsSRC.Rows(SrcRow).Value

This, of course, works for just the cell values. But trying to
modify the
above to include the other desired attributes has eluded me.

Thanks Much




Norman Jones

copying all of a row & Attributes
 
Hi R,

Try:

wsSRC.Rows(SrcRow).Copy
ActiveSheet.Paste Destination:=wsDST.Rows(DstRow)
wsDST.Rows(DstRow).PasteSpecial Paste:=8, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False


---
Regards,
Norman



"RjS, CISSP" wrote in message
...
Hi - I hope this question isnt too newbie. I am trying to copy all of a
row,
including all of its attributes like formatting, column widths, etc. The
code
snippet that I am currently using to perform the copy is:

wsDST.Rows(DstRow).Value = wsSRC.Rows(SrcRow).Value

This, of course, works for just the cell values. But trying to modify the
above to include the other desired attributes has eluded me.

Thanks Much





All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com