dim n as long,m as longdim i as longn=val(text1.text)m=0for i = 1 to nm=m-(-1)^i*inext itext2.text = mend sub