Pentru a atribui o valoare unui element dintr-o matrice, trebuie identificat elementul folosind indexul elementului. De exemplu, instrucțiunea de mai jos atribuie valorile London, Hong Kong și Taipei pentru primele trei elemente din matricea numită strLocations:
Option Base 1Dim strLocations(6) As StringstrLocations(1) = "London" strLocations(2) = "Hong Kong strLocations(3) = "Taipei"