I am getting the compile error at pcolor.RGB.
I want to add a color to the line feature.
How to modify the code?
Public Sub surya()
Dim pmxdoc As IMxDocument
Dim pstylegallery As IStyleGallery
Dim pEnustylegalleryItem As IEnumStyleGalleryItem
Dim pstylegalleryItem As IStyleGalleryItem
Dim plinesymbol As ILineSymbol
Dim pcolor As IColorSymbol
Dim pmap As IMap
Dim player As ILayer
Dim pFealayer As IFeatureLayer
Dim pgeofealayer As IGeoFeatureLayer
Dim psimplerender As ISimpleRenderer
Set pmxdoc = Application.Document
Set pstylegallery = pmxdoc.StyleGallery
Set pEnustylegalleryItem = pstylegallery.Items("Line symbols", "ESRI.Style", "Dashed")
Set pstylegalleryItem = pEnustylegalleryItem.Next
Set plinesymbol = pstylegalleryItem.Item
plinesymbol.Width = 5#
plinesymbol.Color = pcolor.Color
Set psimplerender = New SimpleRenderer
Set psimplerender.Symbol = plinesymbol
Set pmap = pmxdoc.FocusMap
Set player = pmap.Layer(0)
Set pgeofealayer = player
Set pgeofealayer.Renderer = psimplerender
pmxdoc.UpdateContents
pmxdoc.ActiveView.Refresh
End Sub