I have a macro that works if I open the file using GetOpenFilename and select the file from the open dialog box (the macro copies the last row of data in the open worksheet and copies to the launch worksheet). But the macro stops just after opening the other workbook if I hard code the file name or read the filename from a cell. I wonder if anyone can help. No error message.
Code below is the working version, I am able open the file called filetoOpen. Just below this code is the commented out code to read the same filename from a cell in the worksheet, or commented out direct text loading of filetoOpen. I have confirmed through message boxes that I am reading in or hard coding the name correctly, and the file does indeed open. Again the macro appears to have finished or stopped, does not execute any steps below the file open step if I read the name or hard code the name (the "test" message is never delivered).
In the end I want to read the file name to open from the worksheet I am in from the cell. I have tried several methods of opening the file (they are commented out in the code) and they all work with the GetOpenFilename code and none work with reading the file or hard coding. The file indeed is a tab delimited text file which I name as .xls name.
I would appreciate any help.
Bookmarks