ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VSTO: ConditionalFormatting not working (https://www.excelbanter.com/excel-programming/344763-vsto-conditionalformatting-not-working.html)

Bob Sullentrup

VSTO: ConditionalFormatting not working
 
Folks,

I'm trying to add a conditional format rule to a cell using Visual Studio
Tools for Office.

This code and others like it

((Excel.Range)rng.Cells[x,colnum]).FormatConditions.Add(
Excel.XlFormatConditionType.xlCellValue,
Excel.XlFormatConditionOperator.xlBetween, "=0.9999", "=100000");

cause a nasty exception that returns an error message featuring a
hexidecimal address where the error occurred.

Any clues?

--
Bob Sullentrup


All times are GMT +1. The time now is 06:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com