VBE eror

  • Thread starter Thread starter Frank Ashley
  • Start date Start date
F

Frank Ashley

I'm trying to remove a project from the project explorer programmatically so
I assumed this would work.
I have 3 projects loaded and the active one is the third one.


Dim oApp As Application

Set oApp = Application
Dim oProj As Object
Set oProj = oApp.VBE.VBProjects.Item(1)
oApp.VBE.VBProjects.Remove (oProj)


but I get the error below


438
Object doesn't support this property or method

Any ideas?

Frank
 
Thanks for the link but it's not what I'm after. I need to remove a project
from the project explorer.
 
If you close the associated workbook/addin, then the project should disappear.
But if you want to keep the workbook open, then that project will always be
there.

I have seen "ghost" projects hanging around after the workbook is closed. But
they haven't bothered anything that I'm doing. If I really want that "ghost"
project closed, I'll close excel and reopen it.
 
Its that "ghost" project I want to remove.

Dave Peterson said:
If you close the associated workbook/addin, then the project should
disappear.
But if you want to keep the workbook open, then that project will always
be
there.

I have seen "ghost" projects hanging around after the workbook is closed.
But
they haven't bothered anything that I'm doing. If I really want that
"ghost"
project closed, I'll close excel and reopen it.
 
Back
Top