Sub TexteFormule()
Dim MaFormule As String, i As Byte
Dim oRegExp As Object, matches As Object
With ActiveCell
ActiveWindow.DisplayFormulas = True
MaFormule = ActiveCell.Text
ActiveWindow.DisplayFormulas = False
MsgBox MaFormule
End With
Set oRegExp = CreateObject("vbscript.regexp")
With oRegExp
.Global = True
.Pattern = "[^\*-\+/=]+"
If .test(MaFormule) = True Then
Set matches = .Execute(MaFormule)
For i = 0 To matches.Count - 1
MaFormule = Replace(MaFormule, matches(i), Evaluate(CStr(matches(i))), , 1)
Next i
End If
End With
MsgBox MaFormule
Set oRegExp = Nothing
Set matches = Nothing
End Sub