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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top