Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #12472

Re: Adding a conditional format to an excel report via vbscript

Newsgroups microsoft.public.scripting.vbscript
Date 2023-02-17 14:28 -0800
References <AcfTgXRfssC1rT90EdyhsgAX8sNJqQ==> <C2D4C350.4261%Gill.Gilliland@UnitedWater.com>
Message-ID <5a13ae9f-1dee-4d54-8732-e6c31a8c4881n@googlegroups.com> (permalink)
Subject Re: Adding a conditional format to an excel report via vbscript
From angelo tavola <angelotavo69@gmail.com>

Show all headers | View raw


Il giorno martedì 31 luglio 2007 alle 16:45:36 UTC+2 Gilliland, Gill ha scritto:
> I've found plenty of references to add a conditional format to an excel
> sheet using VBA, but I cannot figure out how to translate that to vbscript.
> The following is a VBA example that would alternate row colors. I would like
> to set this formatcondition using vbscript:
> Selection.FormatConditions.Delete
> Selection.FormatConditions.Add Type:=xlExpression, _
> Formula1:="=MOD(ROW(),2)=1"
> Selection.FormatConditions(1).Interior.ColorIndex = 15
> Thanks for any help,
> Gill

Back to microsoft.public.scripting.vbscript | Previous | Next | Find similar


Thread

Re: Adding a conditional format to an excel report via vbscript angelo tavola <angelotavo69@gmail.com> - 2023-02-17 14:28 -0800

csiph-web