Hi
I can use VBS to do most things in Excel (copy/paste/create
spreadsheets etc), but I cannot get Conditional Formatting to work.
I've googled and haven't came up with anything that relates to VBS,
only VBA.
The code that Excel makes up from a Macro is:
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlGreater, _
Formula1:="80"
Selection.FormatConditions(1).Font.ColorIndex = 3
VBS accepts the .Delete line, but if I try to add one, it comes up with
errors using the above code.
IE The below works
Set objXL = WScript.CreateObject("Excel.Application")
objxl.Selection.FormatConditions.Delete
But objXL.Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlGreater, Formula1:="80" doesn't.
Does anyone know what syntax I should use to get it to work?
Cheers
Leon