Basic HTML version of Foils prepared 4 May 97

Foil 21 VBScript Language Control Statements

From Introduction to ActiveX, with VBScript CPS616 -- Information Track of CPS -- Spring Semester 97. by Nancy J. McCracken


1 Example using a for loop and an if-then-else for a form with a set of radio buttons named choice1 (note that the loop covers all elements of the form named OrderForm): binSize = False for i = 0 to Document.OrderForm.Elements.Count -1 if Document.OrderForm.Elements(i).Name = "choice1" then if Document.OrderForm.Elements(i).Checked then binSize = True strSize = "Size: " & Document.OrderForm.Elements(i).Value exit for end if end if next

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998