Visual Basic Foro

Programación => Visual Basic 6 => Mensaje iniciado por: The Swash en Diciembre 19, 2009, 06:16:54 pm

Título: Function Exist File VB6
Publicado por: The Swash en Diciembre 19, 2009, 06:16:54 pm
Function:
Código: [Seleccionar]
'------------------------------------------------------
'Coded By The Swash
'the_swash@hotmail.es
'www.Indetectables.net & www.Leandroascierto.com.ar
'Exist Function if know File Exist
'------------------------------------------------------
Public Function Exist(file As String)
 On Error Resume Next
  Exist = GetAttr(file)
 Exit Function
End Function

Use:
Código: [Seleccionar]
If Exist(your file path) Then
  MsgBox"My File Exist"
  Else
  MsgBox"My File Not Exist"
 End If