copy format to new sheet

J

J.W. Aldridge

This code works fine... Just need to add second command to also copy
format of Range ("a14:f44")
from "Ind Templates" to new sheet.



Private Sub Workbook_newsheet(ByVal Sh As Object)
Sheets("Ind Templates").Range("A1:f13").Copy Sh.Range("a1")
End Sub
 
D

Dave Peterson

Option Explicit
Private Sub Workbook_newsheet(ByVal Sh As Object)

with workSheets("Ind Templates")
.Range("A1:f13").Copy _
destination:=Sh.Range("a1")

.range("a14:f44").copy
sh.range("a14").pastespecial paste:=xlpasteformats

end with

End Sub

I made some minor changes that don't matter, but that I find makes the code
easier to read.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top