PC Review


Reply
Thread Tools Rate Thread

Copying Color Index + conditional Formats + validation

 
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      19th Feb 2007
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 With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      19th Feb 2007

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?

 
Reply With Quote
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      19th Feb 2007
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?

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      19th Feb 2007
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" <(E-Mail Removed)> wrote in message
newsFE9DFCA-48D3-48C6-B071-(E-Mail Removed)...
>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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying conditional formats Ron Microsoft Excel Misc 2 13th Nov 2009 08:45 PM
Copying conditional formats Paul Hyett Microsoft Excel Discussion 3 5th Apr 2009 01:30 PM
Copying conditional formats Blue Max Microsoft Excel Discussion 6 25th Nov 2008 12:34 AM
Not copying conditional formats BillRobPV Microsoft Excel Discussion 3 29th Aug 2008 12:48 AM
copying conditional formats =?Utf-8?B?U3RlaW5lcg==?= Microsoft Excel Worksheet Functions 7 11th Aug 2006 08:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:47 AM.