So funktionierts bei mir:
Sub Btn1berech_Click
If txt1cosphi.Text > 1 Then Msgbox ("Cos Phi nicht größer als 1",OK)
If txt1cosphi.Text = 0 Then txt1cosphi.Text = 1
If txt1span.Text = 24 Then txt1Leist.Text = txt1Span.Text * txt1Strom.Text / 1000
If txt1span.Text = 230 Then txt1Leist.Text = txt1Span.Text * txt1Strom.Text * txt1cosphi.Text / 1000
If txt1span.Text = 400 Then txt1Leist.Text = txt1Span.Text * txt1Strom.Text * txt1cosphi.Text * Sqrt(3) / 1000
End Sub
Erels Vorschlag war schon richtig, nur musst Du die .Text-Methode auch bei der If-Abfrage anwenden.
Rechnen mit Textvariablen ist aber auch nicht ganz so die sauberste Art zu programmieren
