Article ID: 183101
Article Last Modified on 10/10/2006
Sub DeleteAfterRun()
Dim x As Object
' This is the code that I want to run once.
MsgBox "Hello, World!"
Set x = Application.VBE.ActiveVBProject.VBComponents
' Delete the current module.
x.Remove VBComponent:=x.Item("TestModule")
End Sub
176476 OFF97: Office Assistant Not Answering Visual Basic Questions
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: XL98 8.0
Keywords: kbdtacode kbhowto KB183101