Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Copying Color Index + conditional Formats + validation

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Copying Color Index + conditional Formats + validation

I tried recording it and it didn't work. That's why I tried the font. Any
other suggestions?

"Joel" wrote:


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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Copying Color Index + conditional Formats + validation

oWS.Cells(r.Row, r.Column).Copy
With aws.Cells(r.Row, r.Column)
.PasteSpecial Paste:=xlPasteFormats
.PasteSpecial Paste:=xlPasteValues
.Locked = oWS.Cells(r.Row, r.Column).Locked
End With



--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Barb Reinhardt" wrote in message
...
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?



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
copying conditional formats T. Valko Excel Discussion (Misc queries) 0 November 12th 09 08:01 PM
Conditional Format - Copying Formats Frank Excel Worksheet Functions 5 April 9th 07 09:44 PM
copying conditional formats Steiner Excel Worksheet Functions 7 August 11th 06 08:14 PM
Copying Abolute formulas and conditional formats Jerry Foley Excel Worksheet Functions 3 February 14th 05 06:02 PM
copying conditional formats to a whole column Markitos Excel Worksheet Functions 0 November 1st 04 11:23 PM


All times are GMT +1. The time now is 01:28 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"