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

Associating toolbars for the menu - visual basic, Associating Toolbars for ...

Associating Toolbars for the menu: 1. Insert the tool bar control to your form. 2. Now follow the steps to append the tool bar control to your form. 3. Then, Right Click

Introduction to visual c++ programming, INTRODUCTION to VISUAL C++ PROGRAMM...

INTRODUCTION to VISUAL C++ PROGRAMMING This section introduces you to develop the applications using VC++. The Single document interface (SDI), multiple document interface (MDI

Recurson, types and concept of recurson

types and concept of recurson

Imagelist, IMAGELIST The CImageList object is a collection of the same ...

IMAGELIST The CImageList object is a collection of the same sized images, all of which can be referred to by its index. The ImageList are used to proficiently manage the large

Program to draw a rectangle shape , Create a project that draw a rectangle ...

Create a project that draw a rectangle shape which may be either (*) or (+) according to the selected radio button. The number of rows in the shape will be taken from the 1 st

Creation of the menu in visual basic, Creation of the Menu in VB 1. Ini...

Creation of the Menu in VB 1. Initiate a new project by choosing a file and then new project. 2. Now select the Standard EXE as the Project type. 3. Build the Form1 activ

Indexing - visual basic, Indexing: In libraries, the card catalog is t...

Indexing: In libraries, the card catalog is the index. The three indices are used in the library. The Author, Subject and title are the 3 indices. Each index is relative. The

Variant subtypes, Beyond the simple string or numeric classifications, Vari...

Beyond the simple string or numeric classifications, Variant can make added distinctions regarding the specific nature of numeric information. For instance, you can have numeric in

Check whether a number is palindrome or not, Function IsPalindrome(str) ...

Function IsPalindrome(str) Dim iStart,iEnd,ctr,blnPalin str=trim(str) blnPalin=true iEnd=len(str) iCnt=round(iEnd / 2) iStart=1 for ctr=1 to cint(iCnt) if(mid(str,iEnd,

Develop a university database using ms-access, Question 1 Write about the ...

Question 1 Write about the Visual Basic Application Development Life cycle with a sample Forms development for performing integer arithmetic operations Question 2 Discuss 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