View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default How do I retain formatting?

The default property for a range is Value, so your statement is only
assigning one value to another cell's value. If you use the range's Copy
method, then you bring everything about the cell over. Give this a try...

wbS.Range("E" & lngRowNo).Copy Wbd.Range("C" & lngNewRow)

--
Rick (MVP - Excel)



"Jock" wrote in message
...
The following line of code will copy data from one sheet (Wbs) to another
(Wbd):

Wbd.Range("C" & lngNewRow).Value = wbS.Range("E" & lngRowNo)

How can I adapt the above to retain the formatting from the source sheet?
--
Traa Dy Liooar

Jock