I have a workbook that opens another workbook and prints data from the second workbook. The following is from the section of code from the first workbook that opens the second workbook (code that is irrelevant to the question has been modified or removed):
Application.ScreenUpdating = False Application.DisplayAlerts = False Dim wb_original As Workbook Dim ws_original As Worksheet Set wb_original = Application.ActiveWorkbook Set ws_original = Application.ActiveSheet Set opened_workbook = Workbooks.Open(filename) wb_original.Activate ws_original.Activate Application.DisplayAlerts = True Application.ScreenUpdating = TrueThis code was written for Excel 2010 and works as intended in that version of Excel. In Excel 2016, it does not work as intended.
In Excel 2010, after the code has completed, the worksheet in the first workbook from which the opening of the second workbook is triggered is displayed. By contrast, in Excel 2016, it is the opened workbook that is displayed after the code has completed.
Looking through Excel 2016 Help (!!!), I see mention of a difference between Excel 2016 and Excel 2010 regarding Single Document Interface and Multiple Document Interface that may be relevant, although I have not grasped the precise details.
I’m looking for advice from those familiar with Excel 2016.