Hi,
I am getting a Type Mismatch Error in the following code:
Sub z()
Dim u1 As Double, u2 As Double, m As Double, s As Double, i As Long
Dim z(1 To 2) As Double
m = 0
s = 1
For i = 1 To 100
u1 = Rnd()
u2 = Rnd()
z(1) = Sqr(-2 * Log(u2)) * Cos(2 * Application.WorksheetFunction.pi *...