Private Sub Command1_Click()
Dim a, b, c, x, u1, u2, w1, w2 As Double
a = Val(Txt_a.Text)
b = Val(Txt_b.Text)
c = Val(Txt_c.Text)
x = Atn(b / a)
u1 = ArcCos(c / Sqr(a ^ 2 + b ^ 2)) + x
u2 = (2 * 3.14159265358979  ArcCos(c / Sqr(a ^ 2 + b ^ 2)))
+ x
w1 = (u1 / 3.14159265358979) * 180
w2 = (u2 / 3.14159265358979) * 180
If w2 > 360 Then
w2 = w2  360
End If
Lbl_Answer1.Caption = Round(w1, 2)
Lbl_Answer2.Caption = Round(w2, 2)
End Sub
Public Function ArcCos(y As Double)
ArcCos = Atn(y / Sqr(y * y + 1)) + 2 * Atn(1)
End Function
Private Sub Command2_Click()
Txt_a.Text = ""
Txt_b.Text = ""
Txt_c.Text = ""
Lbl_Answer1.Caption = ""
Lbl_Answer2.Caption = ""
End Sub

Explantion
There is no
builtin function for Arc Cosine but there is one such
function for Arc Tangent
i.e Atn.
However, we can create one function for ArcCos using the
formula
ArcCos = Atn(y / Sqr(y * y + 1)) + 2 * Atn(1)
which is derived
from Pythagoras Theorem using a rightangled triangle.
