View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Dave is offline
external usenet poster
 
Posts: 1,388
Default Copy format from another Workshet

You're definately on the right track here, the only thing I can see is you
need to reference the ".interior" property before the .colorindex & .pattern
..... as in
"interior.colorindex" & "interior.pattern". Likely you will need both
spreadsheets open to run the code snippet. Addressing each column as a
range may not give you the results you are looking for if each cell in the
column has different formatting in which case you may need to address each
cell individually (just not sure)
Best

"Nde" wrote:

Hello,

I tried to use this code to make it easy. But the macro failed at colorindex.

With Range("A:BF")
.Formula = Workbooks(ReforecastWorkbook).Sheets("ReForecast -
Detailed").Range("A:BF").Formula
.ColorIndex = Workbooks(ReforecastWorkbook).Sheets("ReForecast -
Detailed").Range("A:BF").Interior.ColorIndex
.Pattern = Workbooks(ReforecastWorkbook).Sheets("ReForecast -
Detailed").Range("A:BF").Interior.Pattern
End With

How can I combine all that ?

Nde