VERSION 1.0 CLASS BEGIN MultiUse = -1 'True Persistable = 0 'NotPersistable DataBindingBehavior = 0 'vbNone DataSourceBehavior = 0 'vbNone MTSTransactionMode = 0 'NotAnMTSObject END Attribute VB_Name = "CustomVBProject" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = False Attribute VB_Exposed = False Option Explicit ' The CustomVBProject class wraps the built-in VBProject object. ' Wrapping this object allows us to continue to use its ' inherent properties and methods, but also to add new custom ' properties and methods. Private p_vbpProject As VBIDE.VBProject Private p_colModules As Modules Public Name As String Public Property Set VBProject(vbpProject As VBIDE.VBProject) ' Write-once property stores reference to VBProject object. If p_vbpProject Is Nothing Then Set p_vbpProject = vbpProject End If End Property Public Property Get VBProject() As VBIDE.VBProject ' Returns reference to the VBProject object that this ' class wraps. By using this property, you can access any ' of the built-in properties of a VBProject object ' through the CustomVBProject object. Set VBProject = p_vbpProject End Property Public Property Set Modules(colModules As ExportToCodeLib.Modules) ' Object property to set Modules collection. Set p_colModules = colModules End Property Public Property Get Modules() As ExportToCodeLib.Modules ' Object property to return Modules collection. Set Modules = p_colModules End Property Private Sub Class_Initialize() ' Create new Modules collection for this ' CustomVBProject object. Set Me.Modules = New Modules ' Set Parent property for Modules collection to point ' to this object. Set Me.Modules.Parent = Me End Sub