Sub Farah()
Application.ScreenUpdating = False
' OPEN VB EDITOR
Application.SendKeys "%{F11}", True
Application.Wait Now + TimeValue("00:00:01")
' TOOLS
Application.SendKeys "%T", True
Application.Wait Now + TimeValue("00:00:01")
' PROJECT PROPERTIES
Application.SendKeys "E", True
Application.Wait Now + TimeValue("00:00:01")
Application.SendKeys "fa22(+-)74ed"
Application.Wait Now + TimeValue("00:00:01")
Application.SendKeys "~", True ' ENTER
Application.Wait Now + TimeValue("00:00:01")
Application.SendKeys "~", True ' ENTER
Application.Wait Now + TimeValue("00:00:01")
' CLOSE THE EDITOR.
Application.SendKeys "%FC"
DoEvents
Set VBComps = ActiveWorkbook.VBProject.VBComponents
Application.Wait Now + TimeValue("00:00:01")
For Each VBComp In VBComps
Application.Wait Now + TimeValue("00:00:01")
Select Case VBComp.Type
Case vbext_ct_StdModule, vbext_ct_MSForm, _
vbext_ct_ClassModule
VBComps.Remove VBComp
Case Else
DoEvents
With VBComp.CodeModule
.DeleteLines 1, .CountOfLines
End With
End Select
Next VBComp
DoEvents
Application.ScreenUpdating = True
End Sub