Hej
Not much of this makes any sence to me. Mostly becourse my english is lagging a bit, and second that im not very good at programming anything :p
i guess whe it should do is this ?
Deleting All VBA Code In A Project
This code will delete ALL VBA code in a VBProject.
Sub DeleteAllVBACode()
Dim VBProj As VBIDE.VBProject
Dim VBComp As VBIDE.VBComponent
Dim CodeMod As VBIDE.CodeModule
Set VBProj = ActiveWorkbook.VBProject
For Each VBComp In VBProj.VBComponents
If VBComp.Type = vbext_ct_Document Then
Set CodeMod = VBComp.CodeModule
With CodeMod
.DeleteLines 1, .CountOfLines
End With
Else
VBProj.VBComponents.Remove VBComp
End If
Next VBComp
End Sub
but where should i put it, and does it needs to be compiled or something like that ?
I could upload the file to here if u maybe have time to take a look at it ?
/Thomas
Bookmarks