G
Gregg
Hello, again.
I have this code below that successfully deletes a certain VBE module
within the file. But, I'd feel more comfortable if I could replace
"activepresentation" with what we use in Excel as "thisworkbook".
That's an object that is the file where the current macro code is
running. "activepresentation" leaves me open to error in the case
another presentation is active when this code is ran. It will misfire,
looking for the module in that file, not the host file. I want it to
look within the file running the code (like "thispresentation") but
don't know the object.
Sub RemoveModule()
Dim vbcompX As VBComponent
Set vbcompX = ActivePresentation.VBProject. _
VBComponents("TempMacros")
ActivePresentation.VBProject.VBComponents.Remove vbcompX
End Sub
Is there such a rascal?
Thanks,
Gregg
I have this code below that successfully deletes a certain VBE module
within the file. But, I'd feel more comfortable if I could replace
"activepresentation" with what we use in Excel as "thisworkbook".
That's an object that is the file where the current macro code is
running. "activepresentation" leaves me open to error in the case
another presentation is active when this code is ran. It will misfire,
looking for the module in that file, not the host file. I want it to
look within the file running the code (like "thispresentation") but
don't know the object.
Sub RemoveModule()
Dim vbcompX As VBComponent
Set vbcompX = ActivePresentation.VBProject. _
VBComponents("TempMacros")
ActivePresentation.VBProject.VBComponents.Remove vbcompX
End Sub
Is there such a rascal?
Thanks,
Gregg