Pasting with new formatting.

DrSwaity
09-14-2004, 03:19 PM
Okay, here is what I want to do, below is the code for something that copies from workbook a to workbook b. The end result I would like is for the data in workbook b to be copied as is, but with arial size 10 font. Is there any way to do this or do I need to handle this manually?



realpath = "C:\invoices\Statements\"
savename = realpath & pointID2
Worksheets("Output").Range("B1:K65536").Copy
Workbooks.Open ("C:\invoices\statementmaster.xls")
Workbooks("statementmaster.xls").Activate
Worksheets("Statement").Activate
ActiveSheet.Paste Destination:=Worksheets("Statement").Range ("B1:K65536")
ActiveWorkbook.SaveAs Filename:=savename, FileFormat:=xlNormal
ActiveWorkbook.Close
Workbooks("Master Invoice.xls").Activate


Thanks for the help!

Jamirez
09-14-2004, 03:43 PM
As far as I know, you'll have to handle it manually.


Worksheets("Statement").Activate
ActiveSheet.Paste Destination:=Worksheets("Statement").Range ("B1:K65536")
ActiveSheet.Cells.Font.Name = "Arial"
ActiveWorkbook.SaveAs Filename:=savename, FileFormat:=xlNormal
ActiveWorkbook.Close
Workbooks("Master Invoice.xls").Activate

DrSwaity
09-14-2004, 04:30 PM
Thank you very much, that did the trick wonderfully!


Thanks agian!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum