Private Sub Form_Click()
Dim pi As Double
Dim n As Long
n = 1
Do
pi = pi + 4 * ((-1) ^ (n - 1) * (1 / (2 * n - 1)))
n = n + 1
Loop Until 1 / (2 * n - 1) < 0.000001
Print pi
End Su
Private Sub Form_Click()
Dim pi As Double
Dim n As Long
n = 1
Do
pi = pi + 4 * ((-1) ^ (n - 1) * (1 / (2 * n - 1)))
n = n + 1
Loop Until 1 / (2 * n - 1) < 0.000001
Print pi
End Su