ist es möglich, eine Berechnung in einer InputBox auszuführen, die das Ergebnis dann wiederum mit einer MsgBox anzeigt?
Also z.b. Eingabe in InputBox 10+12,Ausgabe in MsgBox 22.
Für eure Hilfe wäre ich sehr dankbar!
Gruß
Pia
Sub til()
Dim i As String
i = InputBox("Formel?")
If i = "" Then Exit Sub
On Error GoTo ENDE
MsgBox Evaluate(i)
Exit Sub
ENDE:
MsgBox "Ungültige Eingabe!"
End Sub
Private Sub CommandButton1_Click()
Application.SendKeys "{F2}{POS1}={ENDE}^+a{POS1}'~"
End Sub