Before to go to the next part of code i need to bee sure if in dir are present 5 files.
Without this condition exit sub.
Code: Select all
Do While Len(File)
If InStr(File, "Report_cc_Inattivi_"& my_var) > 0 Then
X = X + 1
End If
File = Dir$
Loop