For each next loop - vbscript, Visual Basic Programming

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:


HEAD TITLE Forms and Elements TITLE HEAD



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)


End Sub





FORM NAME="frmForm"

Input Type = "Text"

Input Type = "Text"

Input Type = "Text"

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

Posted Date: 4/18/2013 5:56:29 AM | Location : United States

Related Discussions:- For each next loop - vbscript, Assignment Help, Ask Question on For each next loop - vbscript, Get Answer, Expert's Help, For each next loop - vbscript Discussions

Write discussion on For each next loop - vbscript
Your posts are moderated
Related Questions
sir , i need visual basic form design & coding for Reynolds number & type of flow .

You can employ until keyword in two ways to verify a condition in a Do...Loop statement. You can verify the condition before you enter the loop (as illustrated in the following Chk

A Project to Display a Database: 1. Suppose that there are 5 fields describing a customer. Id, address, name, city & state. 2. Put 5 text boxes on the form to exhibit the r

I am having a hard time with calculating APY in my project. Every time I run the program my second APY is blank.

INTRODUCTION TO DATABASE APPLICATIONS   In this section, we define a dialog and tab order that is the order in which the controls will be navigated during the execution. The D

Option Explicit Declaration: If the option explicit is used essentially then all the variables will have to be declared. Or else an error will be reported saying that the vari

This is a series of VBScript statements enclosed through the Function & End Function statements. A Function procedure is same to a Sub procedure, however can also return a value. T

Event-Driven Programming: The Event-driven programming allows the program to react to various inputs or events.   The action on a graphical component is an event. For il

Device Contexts: The Device Context (DC) is represented by the data type Handle to Device Context (HDC). The HDC is a handle to somewhat you can draw on; it can be the whole s