Hi all,
I'd like to create an excel vba which can do the following:
An excel sheet contains filepath of the files to be opened.
1. Loops through the 2nd column and opens the file in Text format so that formulas are written as strings.
2. If the file is already open, it does not open the file and moves to the next line.
I don't know how to continue from here.
Any help would be appreciated.
I'd like to create an excel vba which can do the following:
An excel sheet contains filepath of the files to be opened.
1. Loops through the 2nd column and opens the file in Text format so that formulas are written as strings.
2. If the file is already open, it does not open the file and moves to the next line.
Code:
Sub OpenAsTextFormat()
Dim LastRow as Long
Dim afilepath as String
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
For x = 1 to LastRow
afilepath = Cells(x, 2)
I don't know how to continue from here.
Any help would be appreciated.