Can anyone explain why this isn't working, its throwing an error saying:
Line: 14 Char: 1 Error: Object Required:'[string: "H:\VBS"]' Code: 800A01A8
Const xlDelimited = 1
Const xlNormal = -4143
Set Excel = CreateObject("Excel.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
Dim Excel
dim objShell
dim objFolder
Dim fileLocation
set objShell = CreateObject("shell.application")
set objFolder = objshell.BrowseForFolder(0, "Select File Location", 1, "H:\")
set fileLocation = CStr(objFolder.self.path)
Set Excel = CreateObject("Excel.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
folderDestination = InputBox("Enter Move to folder")
For Each f In fso.GetFolder(fileLocation).Files
If LCase(fso.GetExtensionName(f)) = "csv" Then
.Workbooks.Open
.Sheets(1).Columns("A").TextToColumns .Range("A1"), xlDelimited,,,,,,,True,"|"
.ActiveWorkbook.SaveAs .ActiveWorkbook.Path & "\1.xls", xlNormal
.Quit
End If
Next
Quite confused to say the least :S Once again any help is much appreciated!