Hi Stephen,

When I tried copying the line exactly as you entered it, i.e.

Application.Run "ATPVBAEN.XLA!Random", ActiveSheet.Range("$A$1:$A$100"), 1, 100, 5, , 2
I got an error which said "ATPVBAEN.XLA!Random" could not be found.

When I changed it to:

Application.Run "ATPVBAEN.XLAM!Random", ActiveSheet.Range("$A$1:$A$100"), 1, 100, 5, , 2
(with an extra 'M' in the filename), as the macro recorded gave me originally, I got the error that I described above:

Run-time error '1004':

Method 'Run' of object '_Application' failed


Any suggestions?