Prikazi cijelu temu 22.04.2011 15:27
Kiro Van mreze
Clan
Registrovan od:04.02.2009
Lokacija:Velika Kladuša; BiH


Predmet:Re: Ideje i rjesenja iz teme fiskalizacija
NeÅ¡to ne Å¡tima ovako prođe trenutno
a kad mu pustim "RACUN" '& BrojRac & ".IN$" traje 22 sekunde.
zxz, de molim te ti probaj kod sebe.
PreuzmiIzvorni kôd (Visual Basic):
  1. Function PBRF(BrojRac As String) As String
  2. Dim MyTime(1 To 2), traje
  3. Dim i As Integer
  4. Dim t
  5. Set t = Application.FileSearch
  6. With t
  7.     .NewSearch
  8.     .LookIn = "C:\temp\Printed"
  9.     .FileName = "RACUN*" '& BrojRac & ".IN$"
  10.    .FileType = 1
  11.     MyTime(1) = Time
  12.     If .Execute() > 0 Then
  13.      MyTime(2) = Time
  14.      traje = Format(MyTime(2) - MyTime(1), "h:m:s")
  15.      MsgBox traje
  16.         MsgBox "There were " & .FoundFiles.Count & _
  17.         " file(s) found."
  18.         For i = 1 To .FoundFiles.Count
  19.             MsgBox .FoundFiles(i)
  20.         Next i
  21.     Else
  22.         MsgBox "There were no files found."
  23.     End If
  24. End With
  25.  
  26. End Function