Article ID: 170495
Article Last Modified on 8/27/2007
Two drop-down menus
One one-line text box
One push button
Drop1
Object Name
-------------------------------------
Second Drop-Down Menu Drop2
One One Line Text Box Text1
One Push Button Button1
sub button1_onclick
' Create the form object.
dim theform
set theform = document.form1
' Return the value from the first drop-down menu. Drop-down text
' boxes return values as text. The Cint function converts text
' into an integer.
firstvalue = Cint(theform.drop1.options _
(theform.drop1.selectedindex).text)
' Return the value from the second drop-down menu.
secondvalue = Cint(theform.drop2.options _
(theform.drop2.selectedindex).text)
' Display the results in a text box.
theform.Text1.value = firstvalue + secondvalue
end sub
Additional query words: 97 fpscript
Keywords: kbhowto kbusage KB170495