jwise
02-21-2014, 04:31 PM
OK, I admit I read somewhere to avoid copy/paste. I want to copy a row of data from one worksheet to another. First I copy the header row. But it copies only the data and I want things like column width copied as well. I can't seem to find the correct parameter to use to make it copy everything.
wsNewM.rows(1) = wsOldM.rows(1)
This was my first attempt and it moved nothing. So I added the ".Value" as such:
wsNewM.rows(1).Value = wsOldM.rows(1).Value
This copies the data but nothing else. (wsNewM and wsOldM are both worksheets and properly declared.)
I also notice that VBE religiously changes my capitalization of "Rows" to "rows". Why? I thought this was some kind of object readability issue.
Thanks
wsNewM.rows(1) = wsOldM.rows(1)
This was my first attempt and it moved nothing. So I added the ".Value" as such:
wsNewM.rows(1).Value = wsOldM.rows(1).Value
This copies the data but nothing else. (wsNewM and wsOldM are both worksheets and properly declared.)
I also notice that VBE religiously changes my capitalization of "Rows" to "rows". Why? I thought this was some kind of object readability issue.
Thanks