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

Mechanical project, sir , i need visual basic form design & coding for Reyn...

sir , i need visual basic form design & coding for Reynolds number & type of flow .

Cdatabase class - database application, Cdatabase Class: The CDataBase...

Cdatabase Class: The CDataBase class helps to connect to the data source. The Open member function opens a connection to the data source. CRecordset class is used for performi

Vb.net applications, outline and explain in detail any 10 applications of v...

outline and explain in detail any 10 applications of vb.net

Variable naming conventions, For reason of readability & consistency, emplo...

For reason of readability & consistency, employ the following prefixes along with descriptive names for variables in your VBScript code. S ub type Prefi

Intrinsic controls, INTRINSIC CONTROLS   The Intrinsic controls are th...

INTRINSIC CONTROLS   The Intrinsic controls are the built-in controls. Few of the controls are Combo box, Check box, Command Button, Label etc. The controls have properties re

Hotel management system, i need to do my final project for my last year bsc...

i need to do my final project for my last year bsc honours degree in Business Information systems. I need to develop a system which is operational for hotel management system. th

Deleting handlers with class wizard, Deleting Handlers With Class Wizard: ...

Deleting Handlers With Class Wizard: The handler can be deleted by using the class wizard. The class wizard will delete the prototype and message map entry. The user should ma

Files in a sdi and mdi application, Files in a SDI and MDI Application: ...

Files in a SDI and MDI Application: Both the SDI and MDI projects have 4 implementation files (.cpp extension). These are the files equivalent to the Document Class, View Clas

Runtime proggramming, i have a database i want mange it network and i want ...

i have a database i want mange it network and i want write it with vb.net so how i can do this

Messages - visual basic programming, MESSAGES The Windows-based applica...

MESSAGES The Windows-based applications do not make explicit function calls to acquire input. They wait for the system to pass the input to them. The system passes input to the

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