I don't see anay relation between the calculation in mOduel1 and the code in the userform.
You migth reduce all code in the userform to:
Private Sub ComputeButton_Click()
If PowerBox <> "" Then
C = (pA.Value * (1 - pA.Value) / KappaBox + pB.Value * (1 - pB.Value)) * ((Application.NormSInv(1 - AlphaBox / 2) + Application.NormSInv(D)) / (pA.Value - pB.Value)) ^ 2 And E.Offset(0, 0) = "Sample Size (nB)" And E.Offset(0, 1) = C
Else
Z = (pA.Value - pB.Value) / Sqr(((pA.Value * (1 - pA.Value)) / (nB.Value * KappaBox)) + ((pB.Value * (1 - pB.Value)) / nB.Value))
D = Application.NormSDist(Z - Application.NormSInv(1 - AlphaBox / 2)) + Application.NormSDist(-Z - Application.NormSInv(1 - AlphaBox / 2)) And E.Offset(0, 0) = "Power (1-Beta)" And E.Offset(0, 1) = D
End If
End Sub
Private Sub CancelButton_Click()
Unload Me
End Sub