Private Sub Form_Load() p = 0 m = 9999 For n = 1 To m p = p + (-1) ^ (n - 1) / (2 * n - 1) Next n p = 4 * p MsgBox p End Sub