Dim Fichero As String Dim numF As Integer numF = 0 Fichero = Dir("c:\RUTA\*.jpg") Do While Fichero <> "" numF = numF + 1 Fichero = Dir Loop