Option Explicit
Sub Desactiver()
Dim VBC As Object, i&
For Each VBC In ThisWorkbook.VBProject.VBComponents
With VBC.Codemodule
For i = 1 To .CountOfLines
If .Lines(i, 1) Like "Option Explicit*" Then
.ReplaceLine i, Replace(.Lines(i, 1), "Option Explicit", "'Option Explicit")
Exit For
End If
Next
End With
Next
End Sub
Sub Reactiver()
Dim VBC As Object, i&
For Each VBC In ThisWorkbook.VBProject.VBComponents
With VBC.Codemodule
For i = 1 To .CountOfLines
If .Lines(i, 1) Like "'Option Explicit*" Then
.ReplaceLine i, Replace(.Lines(i, 1), "'Option Explicit", "Option Explicit")
Exit For
End If
Next
End With
Next
End Sub