Jumat, 13 April 2012

Re: [ExcelVBA] Re: Formatting with Macro

 


Hey Steve,

I just recorded this....

Selection.FormatConditions.AddColorScale ColorScaleType:=2
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _
xlConditionValueLowestValue
With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor
.Color = 2650623
.TintAndShade = 0
End With
Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _
xlConditionValueHighestValue
With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor
.Color = 10285055
.TintAndShade = 0
End With

I opened a new sheet, selected New Rule from Conditional formatting and pressed enter/return so everything is default and for A1.
You can prob googlee/whatever the FormatConditions collection and so on for more info.

HTH
Lisa

Sent: Fri, Apr 13, 2012 2:33 pm
Subject: [ExcelVBA] Re: Formatting with Macro

Hi Lisa,
Not sure I have the ability to put code together for this that implements
onditioinal formatting of the nature I'm talking about. I still rely on
ecording macros and then editing to suit. VBA won't let me record conditional
ormatting steps.

hanks,
Steve

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar