Sabtu, 14 April 2012

[ExcelVBA] Re: Formatting with Macro

 

I can post it on Monday. It's on my work PC. Warning, it is a very long code...

--- In ExcelVBA@yahoogroups.com, Dr John C Bullas <john.bullas@...> wrote:
>
> Can you post the answer please?
>
> Dr B
>
> On 14/04/2012, sspatriots <sspatriots@...> wrote:
> > Lisa,
> >
> > Well I finally figured out what I was doing wrong after reading your last
> > post. I was trying to record the macro by going through the 'Conditional
> > Formatting - Manage Rules' menu to create the macro. It would never record
> > those steps. Anyhow, tried what you said and after a few hours of
> > manipulating several other rules everything works much better than I
> > expected. I had a few problems with the part that kept trying to set one
> > priority in front of the other...
> >
> > Thanks for the help and tips.
> >
> >
> > Regards,
> >
> > Steve
> >
> > --- In ExcelVBA@yahoogroups.com, 1z@ wrote:
> >>
> >>
> >> 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]
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > ----------------------------------
> > 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
> >
> > ----------------------------------Yahoo! Groups Links
> >
> >
> >
> >
>
> --
> Sent from my mobile device
>
>
>
>
> ===========================
> http://uk.linkedin.com/in/drjohnbullas
>

__._,_.___
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