I am opening a layer with the code below. But I have a field that I want to set the symbology to.After the Shapefile is added to the project, how do I change the symbology?Class = 1 set to redClass = 2 set to blueetc
Sub AddXYShapefileCreatedTable_Click(FileName As String)
Dim pMxDocument As IMxDocument
Dim pMap As IMap
Dim pworkspaceFactory As IWorkspaceFactory
Dim pfeatureWorkspace As IFeatureWorkspace
Dim pFeatureLayer As IFeatureLayer
'Create a new ShapefileWorkspaceFactory object and open a shapefile folder
Set pworkspaceFactory = New ShapefileWorkspaceFactory
Set pfeatureWorkspace = pworkspaceFactory.OpenFromFile("C:\Temp", 0)
'Create a new FeatureLayer and assign a shapefile to it
Set pFeatureLayer = New FeatureLayer
Set pFeatureLayer.FeatureClass = pfeatureWorkspace.OpenFeatureClass(FileName)
pFeatureLayer.Name = pFeatureLayer.FeatureClass.AliasName
'pfeaturelayer.ScaleSymbols
'Add the FeatureLayer to the focus map
Set pMxDocument = Application.Document
Set pMap = pMxDocument.FocusMap
pMap.AddLayer pFeatureLayer
End Sub