Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nde Nde is offline
external usenet poster
 
Posts: 16
Default Copy format from another Workshet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
Nde Nde is offline
external usenet poster
 
Posts: 16
Default Copy format from another Workshet

The Macro works, but not results ! Youe guess was the good one, cells have
different format !

How can I go through each cell ?

Nde


"Dave" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel workshet can not open in desktop [email protected] Excel Discussion (Misc queries) 1 November 10th 08 11:21 AM
Automatic extend row in workshet. Rao Ratan Singh New Users to Excel 0 February 4th 06 06:05 PM
Automatic extend row in workshet. Gary''s Student New Users to Excel 0 February 4th 06 02:37 PM
Placing Workshet Name in cells T De Villiers[_3_] Excel Programming 1 September 21st 05 12:41 PM
Workshet onchange Mark Excel Programming 2 August 25th 04 09:12 AM


All times are GMT +1. The time now is 07:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"