Name of VBAProject ???

C

Charlotte E.

All VBAProject gets the name "VBAProject" by default.

But sometimes it is nice to be able to rename it - which luckily is easy
done :)

But, is there anyway to determine the name of the VBA project, which the
current/running macro/sub is placed in?


TIA,
 
S

Shasur

Hi

Here is a hint

Sub Project_Name()


Dim oVBP As VBProject ' VB Project Object


Set oVBP = ThisWorkbook.VBProject '. VBProjects

MsgBox oVBP.name

' you can set it also

oVBP.name = "NewVBAProject"


End Sub

Cheers
Shasur
 
Top