There are multiple questions concerning this problem already however none of the answers seem to solve the problem for me. The problem is this: I am having to edit a large number of .csv files so am doing this via Excel VBA. The first three columns are dates in format dd/mm/yyyy hh:mm:ss and these dates are converted to the US format MDY when opening via
set wb1 = Workbooks.Open (Filename:=savefolder & filename, Local:=True)
The most common answer for resolving this issue surrounds the known 'feature' that Excel will open CSV with the US dateformat unless the regional settings are used via the Local:=True but I have done this and it is still not working. Can anyone advise of a setting that might need changing to get the following code to work? thanks.
Sub cleandata()
dim wb1 as workbook
dim ws1 as worksheet
dim savefolder, filename as string
savefolder = "C:\Users\ME\Desktop\Clean Up Folder\"
filename = dir(savefolder & "*")
Do while len(filename) >0
set wb1 = Workbooks.Open (Filename:=savefolder & filename, Local:=True)
set ws1 = wb1.worksheets(1)
'code related to what I am wanting to do to the data to 'clean it up'
wb1.close true
filename = dir()
Loop
End Sub