I created a MACRO to read csv file. However, when one of the csv files is absent, the macro stops reading the rest of the other csv files even though their csv files are available. So what should i do to rectify it such that it can proceed to read the other csv files even though one or even some of them are absent?
Private Sub get_file_namevcap() 'check csv file using readdata sub
Dim filename As String
Dim location As String
location = Me.ComboBox2 'csv folder name
Dim ib As Integer
ib = 2
Do While ActiveWorkbook.Sheets("Index_AREA").Cells(ib, 41) <> ""
filename = location & "\" & ActiveWorkbook.Sheets("Index_AREA").Cells(ib, 41) 'getting csv file name in the csv folder
Call readdatavcap3(filename, ib) 'another private sub to read data
ib = ib + 1
Loop
End Sub