View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Copying Color Index + conditional Formats + validation


the best way of learning how to do this is recording a macro when you
manually perform the operation. Here is the code I got. the differnce
between you code and mine is "Font"

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2/19/2007 by Joel Warburg
'

'
Range("D17:F23").Select
With Selection.Interior
.ColorIndex = 42
.Pattern = xlSolid
End With
Range("H18").Select
End Sub


"Barb Reinhardt" wrote:

I have the following working:

With aWS.Cells(r.Row, r.Column)
.Value = oWS.Cells(r.Row, r.Column).Value
.Locked = oWS.Cells(r.Row, r.Column).Locked
'.Font.Interior.ColorIndex =
oWS.Cells(r.Row,r.Column).Font.InteriorColor.Index
end with

I want to copy the background color index, the conditional format and the
cell validation from oWS to aWS. Can someone assist?