arrays
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Arrays

Arrays

resolvedResolved · Low Priority · Version 2003

replyReply Thu 26 Mar 2009, 16:22Delegate Kelvin said...

Kelvin has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

Arrays

What is an array?

For upcoming training course dates see: Pricing & availability

replyReply Tue 14 Apr 2009, 14:06Trainer Carlos said...

RE: Arrays

Hi Kelvin

An array is a data structure consisting of elements that are accessed by indexing.

In most programming languages each element has the same data type and the array occupies a contiguous area of storage.

In VBA as with most other languages Variables normally only store a single value but, in some situations, it is useful to declare a variable as an Array that can store a series of related values.

The indexing in an array begins at 0 so declaring an array as

Dim SalesYear(5) as Integer

will allow you to store 6 years (0 t0 5)

Then in the code SalesYear(3) will return the value stored in that section of the array

Hope this helps

Carlos

Tue 21 Apr 2009: Automatically marked as resolved.

 

Please browse our web site to find out more about
excel-xp-training and other Microsoft training courses.

Excel tip:

Recently used file list

Under the File menu, you may find a list of files at the bottom of the menu. These files represent the most recently used Excel spreadsheets. This file list provides a quick way for you to access your files.

You can disable the file list feature of Excel. This is done by

1. Choose Tools > Options menu. You will see the Options dialog box.
2. Ensure the General tab is selected.
3. Make sure the Recently Used File List check box is cleared.
4. Click on OK.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard