COM Class factory error when trying to instantiate an RGBColorClass

Discussion created by dakuchar23 on Mar 23, 2011
Latest reply on Oct 2, 2014 by groyakkers
I have the following code trying to change the selectioncolor property of one of my layers. When it tries the line in red I get the below error. Please help.

Dim pLD1 As ESRI.ArcGIS.Carto.ILayerDescription = mLayerDescs.Element(2)

Dim color As ESRI.ArcGIS.Display.RgbColor = New ESRI.ArcGIS.Display.RgbColorClass
color.Blue = 210
color.Red = 0
color.Green = 0

pLD1.SelectionColor = color

ERROR: Retrieving the COM class factory for component with CLSID {7EE9C496-D123-11D0-8383-080009B996CC} failed due to the following error: 80040154.