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 1 May 2008, 16:49Delegate Nandana said...

Nandana has attended:
Excel VBA Intro Intermediate course

Arrays

What is an array?

For upcoming training course dates see: Pricing & availability

replyReply Tue 3 Jun 2008, 10:07Trainer Carlos said...

RE: Arrays

Nandana

In computer terms 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

 

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

Excel tip:

Recovering Unsaved Work in Excel 2010

Ever closed your Excel workbook in a hurry without saving your work beforehand? Here's how to get it back.

Choose File then Info, click Manage Versions and then Recover Unsaved Workbooks which will automatically find the spreadsheets that haven't been saved.

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