ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to copy a range with same format !! (https://www.excelbanter.com/excel-programming/330230-how-copy-range-same-format.html)

tttoan

How to copy a range with same format !!
 

Hi all,
I want to write an Excel macro to print out labels. The data source i
from another Excel file, from the current sheet I have a sampl
formatted Label, after run the macro the result is created on the nex
sheet with many labels (because labels are small so I want to print ou
many labels on one paper). Of course the content of each label i
different but same format.
The problem is how to get the format from sample range (cell width
height, font...) and apply to the new out put on the next sheet.

Thanks for any helps.
Toan

--
tttoa
-----------------------------------------------------------------------
tttoan's Profile: http://www.excelforum.com/member.php...fo&userid=2374
View this thread: http://www.excelforum.com/showthread.php?threadid=37411


guygamer

How to copy a range with same format !!
 

Hi,

If you are using Excel 2002, you could use the range PASTESPECIAL
method with paste type xlPasteColumnWidth and xlPasteFormats.


--
guygamer
------------------------------------------------------------------------
guygamer's Profile: http://www.excelforum.com/member.php...o&userid=23579
View this thread: http://www.excelforum.com/showthread...hreadid=374115



All times are GMT +1. The time now is 12:52 PM.

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