answersLogoWhite

0

Creating a Visual Basic Multidimensional Array Declaring a multidimensional array requires both the number of rows and columns to be defined when the array is created. As with standard arrays, multidimensional arrays are declared using the Dimkeyword: Dim strBooks(4, 2) As String The above Visual Basic code excerpt creates a two dimensional String array of 5 rows and 2 columns. Assigning Values to Multidimensional Array Values are assigned to array elements by specifying the index into each dimension. For example, in a two dimensional array, 0, 0 will references the element in the first column of the first row of the array. The following code initializes each element of our array: Dim strBooks(4, 1) As String strBooks (0, 0) = "Learning Visual Basic" strBooks (0, 1) = "John Smith" strBooks (1, 0) = "Visual Basic in 1 Week" strBooks (1, 1) = "Bill White" strBooks (2, 0) = "Everything about Visual Basic" strBooks (2, 1) = "Mary Green" strBooks (3, 0) = "Programming Made Easy" strBooks (3, 1) = "Mark Wilson" strBooks (4, 0) = "Visual Basic 101" strBooks (4, 1) = "Alan Woods" The above example creates a two dimensional array of 5 rows (remember that indexing starts at 0 so this array have elements from 0 to 4 inclusive) and two columns. Column 1 is the book title and column 2 the author.

Answerer 1 Multidimensional arrays are used as follows:-

Dim a(m,n) as integer

for putting value

for i = 1 to m

for j = 1 to n

a(i , j) = val(inputbox("Enter the value"))

s = s & a(i , j) & " "

next j

s = s & vbcrlf

next i

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do you create a program in visual basic?

arrays programms in visual basic


Application of IT in Entertainment and Arts?

visual graphics


Difference in dos and visual basic?

DOS is an OS and Visual Basic is an Application Software..


What are the questions comes for visual basic 6.0 for the exam?

1: Explain Visual Basic IDE. 2: Explain the features of VB


Why do you need to learn visual basic?

For Developing Application


Can you run a Visual Basic program from a Website?

In general principles, you can not run a visual basic compiled program from a website. Visual basic compiled program needs the library files required to run the application. So only when you install the application locally (onto your machine), the application can be executed.


What is building blocks of visual basic?

Hi, enum, global variable, local variables, constants, arrays, boolean operator are building blocks.


How do you explain a term in a visual way?

donkey dick


What are the five types of application you can create in visual studio 2005?

Five types of application you can create in visual studio 2005 are:-Web ApplicationsConsole ApplicationsWeb ServicesSmart Device ApplicationsClass Libraries


What has the author Koji Miyazaki written?

Koji Miyazaki has written: 'An adventure in multidimensional space' -- subject(s): Space (Art), Polyhedra, Visual perception, Form (Aesthetics), Polytopes, Polygons


How can visual literacy impact communication and global understanding?

Explain how visual literacy can be considered a universal language.


What is caption as used in Visual basics?

Can you tell me what is an embedded application