I have a UserForm in PowerPoint with a button on it that opens the Excel file picker dialog. When the file is selected, PowerPoint VBA then opens the selected Excel file in a hidden instance, loads some data from it into the UserForm and leaves the file open whilst the UserForm remains loaded/visible. When this happens, the PowerPoint icon in the Windows taskbar pulses and a second PowerPoint icon hops up and down, indicating that PowerPoint no longer has focus. This is confirmed by the modal UserForm remaining in a defocussed state.
I added several variations of the AppActivate
statement to the PowerPoint VBA code but none work, although no error is raised e.g.
However, if I use the same AppActivate command(s) from the Excel VBE when in the defocused state above, the command works as expected.
How can I get the PowerPoint VBE to return focus to PowerPoint in this case?