strPutBaz = DLookup("PUTBAZ", "PUTANJA") If Right(strPutBaz, 1) = "\" Then strPutBaz = Left(strPutBaz, Len(strPutBaz) - 1) ' uklanja eventualno "\" iz naziva direktorija End If strDatoteka = Dir(strPutBaz & "\*FiskalBaza.mdb") 'strDatoteka = Dir("c:\windows\desktop\novagodina\*_BAZA_FINOS.mdb") Me.cboBAZA.RowSource = "" I = 0 Do While strDatoteka <> "" ReDim Preserve astrPopis(I + 1) astrPopis(I) = strDatoteka & ";" I = I + 1 strDatoteka = Dir Loop For I = 0 To UBound(astrPopis) - 1 'MsgBox i & "," & astrPopis(i) For j = I + 1 To UBound(astrPopis) - 1 If astrPopis(I) < astrPopis(j) Then strPom = astrPopis(I) astrPopis(I) = astrPopis(j) astrPopis(j) = strPom End If 'ovo je služilo za TEST sortiranja 'Debug.Print i; " "; j; " "; 'For k = 0 To 6 ' Debug.Print astrPopis(k); 'Next k 'Debug.Print Next j Next I For I = 0 To UBound(astrPopis) - 1 Me.cboBAZA.RowSource = Me.cboBAZA.RowSource & astrPopis(I) Next