How would you open a file whose name is contained in a specific column in an excel workbook? Note: the catch here is that the file path is external, and I'd like to do this iteratively
I've got a macro that gives me a list of files to open. I want to make a macro to open each of those files from E1 to E100. The current code I've tried to start with is below. Once I am able to open a single file, I'll branch out to iteration. The intent is to open a file whose path is connected to a network like: \nam.corp.company.com\location\folder\subfolder\subfolder2\file.csv
If it helps here's a working site to pull data from. (ex: //chart.finance.yahoo.com/table.csv?s=MSFT)
Code Below:
Sub openEZ()
Dim FilePath2 As String
Application.DisplayAlerts = False
FilePath2 = Range("E4").Value
Workbooks.Open FileName:=FilePath2
Application.DisplayAlerts = True
'ActiveWorkbook.Close
End Sub
[Error image][1] [1]: https://i.stack.imgur.com/a7ZVu.png