I have a VBA code working perfectly except, at the end, I need to close a workbook (which isn’t the active one.)
I can successfully use the following to close a workbook when I hard code the filename, but I need to use a variable name:
Windows(“Fielda.xls”).Activate
ActiveWorkbook.Close
BUT I need the “Fielda.xls” to be a variable. The user chose which file to open earlier in the procedure, and I just need to close whichever one they had opened.
Thanks