Prikazi cijelu temu 19.03.2018 13:16
zxz Van mreze
Administrator
Registrovan od:03.02.2009
Lokacija:Tuzla


Predmet:Re: Loop za provera naziv fajlove
PreuzmiIzvorni kôd (Visual Basic):
  1. Function ImeF()
  2. Dim Putanja As String
  3. Dim Faj As String
  4. Dim Ext As String
  5. Dim ImeFajla As String
  6. Dim I As Integer
  7.  
  8. Ext = "txt"
  9. Fajl = "moj"
  10. Putanja = "C:\Temp\"
  11. ImeFajla = Putanja & Fajl & "." & Ext
  12. START:
  13. If Dir(ImeFajla) = "" Then
  14.   ImeF = ImeFajla
  15. Else
  16.  ImeFajla = Putanja & Fajl & "(" & I & ")." & Ext
  17.  I = I + 1
  18.  GoTo START
  19. End If
  20. MsgBox ImeF
  21. End Function

Ako hoces da broji od 1 onda I=I+1 prebaci red prije
Podrška samo putem foruma, jer samo tako i ostali imaju koristi od toga.