フィーチャクラスのエクステントを更新

'アクティブ データ フレーム内のフィーチャレイヤが参照しているフィーチャクラスのエクステントを更新
Sub subUpdateExtent()
    Dim pMxDocument As IMxDocument
    Set pMxDocument = ThisDocument
    
    Dim pMap As IMap
    Set pMap = pMxDocument.FocusMap
    
    Dim pUID As IUID
    Set pUID = New UID
    pUID.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}"   'IFeatureLayer
    
    Dim pEnumLayer As IEnumLayer
    Set pEnumLayer = pMap.Layers(pUID, True)
    
    pEnumLayer.Reset
    
    Dim pFeatureLayer As IFeatureLayer
    Set pFeatureLayer = pEnumLayer.Next
    
    Dim pFeatureClassManage As IFeatureClassManage
    
    Do While Not pFeatureLayer Is Nothing
        Set pFeatureClassManage = pFeatureLayer.FeatureClass
        pFeatureClassManage.UpdateExtent
        
        Set pFeatureLayer = pEnumLayer.Next
    Loop
    

End Sub