Load Sequential File to Array and Loop through it Forwards and Backwards

Category:
Lists, Collections and Arrays
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This simple example shows how to load a sequential text file into an array and then move through the array forwards and backwards using a control variable. The example uses two command buttons for "Previous" and "Next" and displays the current array item in a label. To use this code start a new project in VB and paste the code into the declarations section of Form1. Press F5 to run the code.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: