Public Sub ActiveProject() Dim project As VBIDE.VBProject Set project = Application.VBE.ActiveVBProject MsgBox project.FilenameEnd Sub