After Save As, switch windows does not work with ActiveWorkbook.Name - Old Workbook Name required until switched

wallac

New Member
Joined
Mar 8, 2006
Messages
4
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.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,214,984
Messages
6,122,601
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top