Controlling Function Recalculation
'
the same as Round excel-function
Function
nonStaticRand()
Application.Volatile
True
nonStaticRand
=
Rnd
()
'
Rnd is a vba-function
End Function
'
Calculate only once, so rand number won't be changed afterwards
Function
staticRand()
Application.Volatile
False
'
you can ignore this line, default is False
staticRand
=
Rnd
()
End Function
posted on 2008-03-26 16:26
Jcat 阅读(204)
评论(0) 编辑 收藏 所属分类:
VBA