求大神帮忙检查这段代码哪里错误,关于“中心极限定理”的Excel编程
Sub 产生随机数N5()'Dim 1 As Integen,Dim i As Integen,Dim X As Single
Rows("1:5").Select
Selection.Clear
Range("E13:F33").Select
Selection.Clear
Range("Al").Select
Randomize
For l = 1 To 200
For i = 1 To 5
X = -3 * Log(Rnd())
Cells(i, 1) = Application.Round(X, 2)
Next i
Next l
Application.Run"ATPUBAEN1XLA!Histogram", ActuveSheet.Range("$6:$6"), ActiveSheet.Range("$E$13"), ActiveSheet.Range("$A$13:$A$31"), False, False, False, False
Range("A1").Select
ActiveWindow.SmallScroll Down:=11
ActiveWindow.SmallScroll ToRight:=4
End Sub
excel VBA 编程 --------------------编程问答-------------------- 最好先使用VisualBasic调试
然后把错误位置与错误内容发出来 --------------------编程问答-------------------- 因为你的需求我不明白,就程序,我看了一下,
Range("Al").Select
Application.Run
这两句有问题
前者是选择的问题,后者是缺少对象。
补充:VB , VBA