Sub ConvertDBF_to_CSV()
Dim strDocPath As String
Dim strCurrentFile As String
Dim Fname As String
[COLOR="Red"]Dim sFiles[/COLOR]
[COLOR="red"]Dim x As Integer, y As Integer[/COLOR]
'* * * Edit the path to your .dbf files in the strDocPath line below!!! * * *
Application.ScreenUpdating = False
[COLOR="red"]x = 0
y = 0
sFiles = Dir(ThisWorkbook.path & "\*.dbf")
'count the files
Do Until sFiles = ""
x = x + 1
sFiles = Dir
Loop[/COLOR]
strDocPath = "F:\user\Files\"
'strCurrentFile = Dir(strDocPath & "*.*")
strCurrentFile = Dir(strDocPath & "*.dbf")
Do While strCurrentFile <> ""
[COLOR="red"]y = y + 1[/COLOR]
[COLOR="red"]'display current status on status bar
Application.StatusBar = "Converting " & y & " of " & x[/COLOR]
Workbooks.Open Filename:=strDocPath & strCurrentFile
Fname = Left$(strCurrentFile, Len(strCurrentFile) - 4) & ".csv"
ActiveWorkbook.SaveAs Filename:=strDocPath & Fname, FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close (False)
strCurrentFile = Dir
Loop
[COLOR="red"]Application.StatusBar = False 'release the status bar back to excel[/COLOR]
Application.ScreenUpdating = True
End Sub