Sub pom()
Dim i As Integer
Dim pole(2) As Variant
Dim x, y, z
x = 1
y = 2
z = 3
'nacitanie premennych do pola pole
pole(0) = x
pole(1) = y
pole(2) = z
'sú tam?
For i = 0 To 2
Debug.Print pole(i)
Next i
'vymazanie premenných z pola pole
For i = 0 To 2
pole(i) = 0
Debug.Print pole(i)
Next i
'sú tam nuly?
For i = 0 To 2
Debug.Print pole(i)
Next i
End Subprípadne takto:Option Explicit
Sub pom()
Dim pole As Variant
Dim x, y, z
x = 0
y = 0
z = 0
pole = Array(x, y, z)
End Sub
jednotlivé hodnoty z poľa potom napr pomocou for i=0 to UBound(pole)
pole(i)=0
next icitovat