I am running Windows 10 with Excel and I have a macro which manipuates an excel file, then ask the user to save as a different workbook name. The macro takes a copy of the ActiveWorkbook.Name of the main workbook and opens a reference excel file. When trying to switch windows back to the main workbook, the macro fails with run-time error '9'. On investigation, the ActiveWorkbook.Name is the correct new name for the file, but the display name in Excel is the old, pre-saved name until the file is selected, where it then updates to the saved as name.
The issue seems to be when Save As is done, the Info screen shows the new name, but the Switch Windows and the file header shows the old name until a different file is selected and then the original file is selected (with old name) does the file display the new name.
Do others see this issue and know how to fix? Is there a "refresh" command?
Thanks.
The issue seems to be when Save As is done, the Info screen shows the new name, but the Switch Windows and the file header shows the old name until a different file is selected and then the original file is selected (with old name) does the file display the new name.
Do others see this issue and know how to fix? Is there a "refresh" command?
Thanks.