View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default copy format to new sheet


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.



"J.W. Aldridge" wrote:

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


--

Dave Peterson