Macro to open files using cell reference
I'm trying to write a macro that will open a series of files using the
contents of a cell that has the file name. The Workbook.Open Filename seems
to need to text string typed in.
Example:
Cells C4 and C5 contain the path & filename of the files
Workbook.Open Filename <reference in C4
Activate the macro in file & then close
Go down 1 cell
Is cell blank? If yes, end, if not
Workbook.Open Filename <reference in C5
Activate the macro in file & then close
Go down 1 cell
Is cell blank? If yes, end, if not <should end here
I think this is pretty easily taken care of with a variable, however, given
that it's been a while since I've done programming, I'm a bit stuck on the
correct commands.
Thanks for your help!!
|