WorkbookBase.VBProject Property

Definition

Gets the virtual Microsoft.Vbe.Interop.VBProject project that is in the workbook.

public:
 property Microsoft::Vbe::Interop::VBProject ^ VBProject { Microsoft::Vbe::Interop::VBProject ^ get(); };
public Microsoft.Vbe.Interop.VBProject VBProject { get; }
member this.VBProject : Microsoft.Vbe.Interop.VBProject
Public ReadOnly Property VBProject As VBProject

Property Value

The virtual Microsoft.Vbe.Interop.VBProject project that is in the workbook.

Examples

The following code example uses the VBProject property to display the name of the Visual Basic for Applications project for the workbook.

This example is for a document-level customization.

private void DisplayVBProject()
{
    MessageBox.Show("The name of the VB project is: " + this.VBProject.Name);
}
Private Sub DisplayVBProject()
    MsgBox("The name of the VB project is: " & _
        Me.VBProject.Name)
End Sub

Remarks

This property refers to the Visual Basic for Applications project, not the Visual Basic project.

Applies to