Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/04/2009, 17:17
franko1809
 
Fecha de Ingreso: enero-2008
Ubicación: Lima - Perú
Mensajes: 1.127
Antigüedad: 16 años, 4 meses
Puntos: 10
Respuesta: Validar existencias de archivos en una carpeta

Tio puedes probar de esta manera aunque es un poco rustico, aunque tendrias que aplicarle un Else en caso el archivo no exista para que desmarque el check

Código:
Private Sub Command1_Click()
If Verificar_Existe(App.path & "\archivos\1.txt") = True Then Check1.Value = 1
If Verificar_Existe(App.path & "\archivos\2.txt") = True Then Check2.Value = 1
If Verificar_Existe(App.path & "\archivos\3.txt") = True Then Check3.Value = 1
End Sub

Private Function Verificar_Existe(path) As Boolean
If Len(Trim$(Dir$(path))) Then
    Verificar_Existe = True
Else
    Verificar_Existe = False
End If
End Function