Can anybody help me understand how to sucessfully access the ConditionalFormats collection from my VFP form?
I'm using the following code but I keep getting the error that "the parameter is incorrect".
lcLastCell = oExcel.ActiveCell.SpecialCells(xlLastCell).Address()
oExcel.Range("B9:" + lcLastCell).Select
oExcel.Selection.FormatConditions.Delete
oExcel.Selection.FormatConditions.Add(xlExpression,1,"=RIGHT($B9,5)='Total'"
I'm using the following code but I keep getting the error that "the parameter is incorrect".
lcLastCell = oExcel.ActiveCell.SpecialCells(xlLastCell).Address()
oExcel.Range("B9:" + lcLastCell).Select
oExcel.Selection.FormatConditions.Delete
oExcel.Selection.FormatConditions.Add(xlExpression,1,"=RIGHT($B9,5)='Total'"