LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Interop - "Unable to set the Color property of the Interior class"

Hello! I am begging for your help...

I am using the Excel interop (Microsoft Excel 11.0 Object Library, version
1.5.0.0) to open an existing workbook and adding conditional formats to
certain cells to mimic "hidding" them. I keep receiving exceptions from the
"Microsoft Office Excel" interop to the effect that I cannot set the font's
color and the interior's color. If you know, could you please reply to this
posting?

Thanks!

The C# code is as follows:

conditionalFormat =
conditionalFormats.Add(Excel.XlFormatConditionType .xlExpression
, System.Reflection.Missing.Value ,
(object)formulas.ToString(), System.Reflection.Missing.Value);
conditionalFormat.Font.Color = 0xff00; // triggers the
"Unable to set the Color property of the Font class"
conditionalFormat.Interior.Color = 0xff00; // triggers
the "Unable to set the Color property of the Interior class"
// conditionalFormat.Font.ColorIndex = 19; Triggers the
"Unable to set the ColorIndex property of the Font class"
// conditionalFormat.Interior.ColorIndex = 19; Triggers
the "Unable to set the ColorIndex property of the Interior class"

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to get the Interior property of the PlotArea class [email protected] Charts and Charting in Excel 2 September 3rd 08 03:41 PM
"Unable to set the Formula property of the Series class" with a tw PeterQ Charts and Charting in Excel 1 February 15th 06 07:37 PM
unable to get the Interior property of the range class joe Excel Programming 4 December 1st 05 12:14 AM
"Unable to get the Pivotfieldsd property of the Pivot Class" twaccess[_21_] Excel Programming 1 July 8th 05 01:42 PM
Unable to set the colorIndex Property of the Interior Class Error GriffyGriff Excel Programming 3 October 3rd 03 04:37 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"