Hi Gary,
I want to also thank Borislav here. I asked him off-line to help me check it with Vista and Office 2007.
His suggestion is to change
* loExcel.SELECTION.FormatConditions.ADD(xlExpression,, '=UPPER(Left($A1,5))="TOTAL"')
to
loExcel.SELECTION.FormatConditions.ADD(xlExpression,, '=UPPER(LEFT(RC1;5))="TOTAL"') && Just change [;] to [,] if you need it.
I don't have Vista here near by to try, so may be someone else can try it just in case.
Thanks again to both of you.
>Naomi,
>
>Your problem is the format you are saving the spreadsheet in:
>
>loExcel.ActiveWorkbook.SAVEAS(tcXLSFileName, 39)
>
>
>39 = Excel5, I don't know if Excel5 supported conditional formatting but Excel 2007 clearly thinks is does not as if you check the file before this line then your conditional formatting is there. Imemdiately afterwards there is no conditional formatting anywhere in the workbook.
>
>If you use Excel8 format (56) , then conditional formatting is retained.
>
>
>loExcel.ActiveWorkbook.SAVEAS(tcXLSFileName, 56)
>
>
>
>Gary.
If it's not broken, fix it until it is.
My Blog