Hi,
below my Macro:
Sub AllFiles()
Dim folderPath As String
Dim filename As String
Dim wb As Workbook
folderPath = "C:\Users\Dom\Desktop\Bob"
If Right(folderPath, 1) <> "" Then folderPath = folderPath + ""
filename = Dir(folderPath & "*.csv")
Do While filename <> ""
Application.ScreenUpdating = False
Set wb = Workbooks.Open(folderPath, Local:=True & filename)
Call ChangeFile
filename = Dir
Loop
Application.ScreenUpdating = True
End Sub
I need to open CSV file with data like Excel, so I wrote Local:=True, but then i have error:"run time error 1004 method open of object workbooks failed"
Any help is greatly appreciated!!
below my Macro:
Sub AllFiles()
Dim folderPath As String
Dim filename As String
Dim wb As Workbook
folderPath = "C:\Users\Dom\Desktop\Bob"
If Right(folderPath, 1) <> "" Then folderPath = folderPath + ""
filename = Dir(folderPath & "*.csv")
Do While filename <> ""
Application.ScreenUpdating = False
Set wb = Workbooks.Open(folderPath, Local:=True & filename)
Call ChangeFile
filename = Dir
Loop
Application.ScreenUpdating = True
End Sub
I need to open CSV file with data like Excel, so I wrote Local:=True, but then i have error:"run time error 1004 method open of object workbooks failed"
Any help is greatly appreciated!!