I have an Excel file with a path and file name in column A. I open the Excel file in col A and make changes to a column and then try to save and close the file opened from col A.
I view in debug the active work book name and path and it shows the file from col A. When I execute .save and .close it save to the path where the main excel file that I am running the macro from resides.
Here is the code showing the debug statements where I look at the active workbook file name and path and then the save and close.
This code is saving the modified excel file from col A to the path where the excel file that is running the macro resides. I modify the excel file in col A to substring a value in col b.
An example is c:\main.xls as the main excel running macro
In c:\main.xls col A there is a value c:\data\somefile.xls
when I change the col B in somefile.xls and do .save .close as seen in above code sample the file is saved in c:\somefile.xls. It should be saving to c:\data\somefile.xls with replace.
As I said above variables have these values
WORKBOOKNAME = somefile.xls
WORKBOOKPATH = c:\data\
Can anyone please tell me why it is not saving to where it was opened from?(c:\data\somefile.xls)
Thank you,
Bookmarks