For each next loop - vbscript, Visual Basic Programming

Assignment Help:

A For Each...Next loop is similar to a For...Next loop. Rather than repeating the statements a particular number of times, For Each...Next loop repeats group of statements for each item in a collection of objects or for each element of an array. It is especially helpful if you do not know how several elements are present in a collection.

In the given HTML code example, the contents of any Dictionary object are utilized to place text in several text boxes:

HTML

HEAD TITLE Forms and Elements TITLE HEAD

SCRIPT LANGUAGE="VBScript"

 

Sub cmdChange_OnClick

Dim d                   'Create a variable

Set d = CreateObject("Scripting.Dictionary")

d.Add "0", "Athens"    

'Add some keys and items d.Add "1", "Belgrade"

d.Add "2", "Cairo"

a = d.items

For i = 0 To d.Count

document.frmForm.Elements(i).Value = a(i)

Next

End Sub

 

SCRIPT

BODY

CENTER

FORM NAME="frmForm"

Input Type = "Text"

Input Type = "Text"

Input Type = "Text"

Input Type = "Button" NAME="cmd Change" VALUE="Click Here"p


Related Discussions:- For each next loop - vbscript

Dialog based application - types of project using visual c++, Dialog Based ...

Dialog Based Application: The application which app wizard generates is based on the dialog template resource.

Employee data, Part 1: Create an application that allows the user to enter ...

Part 1: Create an application that allows the user to enter the following employee data: First Name, Middle Name, Last Name, Employee Number, Department, Telephone Number, Telephon

If - else statement, A variation on the If...Then...Else statement lets you...

A variation on the If...Then...Else statement lets you to choose from various alternatives. By adding up Else If clauses expands the functionality of the If...Then...Else statement

Write a program to sort and display an array, Problem 1. Describe the i...

Problem 1. Describe the importance and usage of .net framework in visual Studio 2. Write a program to sort and display an array of integers in ascending order using the conc

Attributes, departmental store attributes

departmental store attributes

Programming, i have connected my visual basic 2010 express in ports and use...

i have connected my visual basic 2010 express in ports and use it to send sms but it failed... now my teacher said that i have to use my LAN not port to send it instead..... please

Creating constants in vbscript, In VBScript, You create user-defined consta...

In VBScript, You create user-defined constants using the Const statement. It lets you create string or numeric constants along with meaningful names and let you to assign them lite

#simple interest using pseudocode and flowcharts, simple interest using flo...

simple interest using flowchart and psuedocode using the formular s= x + nrx

Create a procedure - vbscript, Each piece of data is passed in your process...

Each piece of data is passed in your process using an argument. Arguments serve like placeholders for the data you wish to pass into your process. You can name your arguments along

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd