Community
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"avbuiten" <
href="mailto:a.v.buiten@hccnet.nl">a.v.buiten@hccnet.nl> wrote in
message
href="news:f1a02bb.4@WebX.maYIadrTaRb">news:f1a02bb.4@WebX.maYIadrTaRb...
You want probably something like the code below.
Use the Local WIndows
to explore the posibilities.
I don't think you can delete or unload entire
files.
'you need a reference (VBA: Tools>Reference, VB>Project>Reference)
to:
' Microsoft Visual Basic for Applications Extensibility 5.3
Sub
Main()
Dim app As Application
Dim vbe As vbe
Dim
nLines As Long
Set app = ThisApplication
Set vbe = app.vbe
Debug.Print vbe.VBProjects(1).Name
nLines =
vbe.VBProjects(1).VBComponents(1).CodeModule.CountOfLines
Debug.Print
vbe.VBProjects(1).VBComponents(1).CodeModule.DeleteLines(1, nLines)
End
Sub