View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Richard Buttrey Richard Buttrey is offline
external usenet poster
 
Posts: 296
Default How dio I attach a variable to an Operator:= ?

Hi,

I have within a procedure the following code. I set the variables
sRed, SOrange etc. earlier in the procedure, and would also like to
set the Operator:= blah, blah as a variable. I've tried passing it as
a string and variant variable but to no avail.

Can anyone help me out please?

i.e how can I get the bit following the Operator:= to recognise a
variable.?

Usual TIA.

With rMyrange.FormatConditions
.Add Type:=xlCellValue, Operator:=xlLess, Formula1:=sRed
.Add Type:=xlCellValue, Operator:=xlLess,Formula1:=sOrange
.Add Type:=xlCellValue, Operator:=xlGreater, Formula1:=sGreen
End With

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________