Bagikan melalui


DocumentBase.VBProject Properti

Definisi

Mendapatkan Microsoft.Vbe.Interop.VBProject untuk dokumen.

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

Nilai Properti

Microsoft.Vbe.Interop.VBProject untuk dokumen.

Contoh

Contoh kode berikut menggunakan VBProject properti untuk menampilkan nama proyek Visual Basic for Applications untuk dokumen. Untuk menggunakan contoh ini, jalankan dari ThisDocument kelas dalam proyek tingkat dokumen.

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

Keterangan

Gunakan properti ini untuk mendapatkan akses ke modul kode dan formulir pengguna.

Berlaku untuk