option explicitPrivate sub form_click()dim sum as longdim i as longfor i=1 to 10sum=sum+factor(i)nextend subPrivate function factor(n as long) as longdim i as longfactor=1for i=1 to nfactor=factor*inextend function