欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

VBA代碼編寫在窗體的文本框TextBox1中輸入不大于9的整數(shù),然后計(jì)算其階乘后在文本框TextBox2中輸出,怎么編?

PrivateSubCommandButton1_Click()

Dima,b1,b2,i,tmp

Setb1=Me.TextBox1

Setb2=Me.TextBox2

a=b1.Text

IfLen(a)=0Thentmp="#Len=0":GoTo1000

IfNotIsNumeric(a)Thentmp="#NotIsNumber":GoTo1000

a=a*1

IfInt(a)<>aThentmp="#notInteger":GoTo1000

Ifa<1Ora>9Thentmp="#"&IIf(a<1,"<1",">9"):GoTo1000

tmp=a

Fori=a-1To2Step-1

tmp=tmp*i

Next

1000:

b2.Text=tmp

EndSub