Home > Programming, Visual Basic > Visual Basic Formula

Visual Basic Formula

November 23rd, 2009

I have a program written in Visual Basic that uses an algorithm for access to part of the program.
EXAMPLE:

=RAND(-1)
* This generates a “random” number between 10,000 and 99,999
thisform.txtVerification.Value = INT((99999-10000+1)*RAND()+10000)

thisform.rightanswer = ;
int(1000000*(round( (year(date()+50)-1900)* ;
month(date()+50)* ;
dow(date()+50)* ;
day(date()+50)+ ;
(val(sys(11,date()+50))- ;
val(sys(11,”01/01/”+ ;
str(year(date()+50),4,0)))),0)/ ;
thisform.txtverification.value))

thisform.Refresh()
ENDPROC

What I need is to be able to type in the “random” number and have this formula return the correct answer. As you can see, it is based on a date.
I need a form with the ability to manually put in any random number, the date, and have it return the correct answer.

I am not a programmer, but I believe this is all that is needed.

Thanks


Visual Basic  Formula

Comments are closed.
Bear