InStr(1, Join((eccc...))
i fill the array with:
Code: Select all
Private Sub FILL_ELAB_ARRAY()
Dim VALORE As String
SQL = "SELECT ELAB, GIORNO FROM DATE_ELAB"
Set RS = New ADODB.Recordset
RS.CursorLocation = adUseClient
RS.Open SQL, CON, adOpenForwardOnly, adLockReadOnly
RS.Sort = ("GIORNO")
If Not (RS Is Nothing) Then
If (RS.State And adStateOpen) = adStateOpen Then RST.Close
Set RS = Nothing
End If
Erase ELAB_ARRAY()
Do While Not RS.EOF
VALORE = RS.Fields(0).Value & "-" & RS.Fields(1).Value
ReDim Preserve ELAB_ARRAY(I)
ELAB_ARRAY(I) = VALORE
RS.MoveNext
Loop
If Not (RS Is Nothing) Then
If (RS.State And adStateOpen) = adStateOpen Then RST.Close
Set RS = Nothing
End If
End Sub