Hello Excel Wizards,
I am trying to write an If Then statement in VBA to have my workbook save in the appropriate file location depending on the cell value of another open workbook.
I have 2 open workbooks. The one workbook (call it "Wbk A") I am saving has to reference the cell value in the other open workbook (call it "Wbk B"). If Wbk B's cell value equals X, then Wbk A will follow a specific save file path. Or a different save file path if Wbk B's cell value equals Y.
The part I am having trouble writing is the portion of the code to say if Wbk B's cell value (in L2 to be exact) equals X....
I know how to write the Then portion since that is the save file path.
Thank you for any and all help!
I am trying to write an If Then statement in VBA to have my workbook save in the appropriate file location depending on the cell value of another open workbook.
I have 2 open workbooks. The one workbook (call it "Wbk A") I am saving has to reference the cell value in the other open workbook (call it "Wbk B"). If Wbk B's cell value equals X, then Wbk A will follow a specific save file path. Or a different save file path if Wbk B's cell value equals Y.
The part I am having trouble writing is the portion of the code to say if Wbk B's cell value (in L2 to be exact) equals X....
I know how to write the Then portion since that is the save file path.
Thank you for any and all help!