AppActivate does not completely restore focus
I have a macro where I open a hyperlink from a cell into a web browser. Then a series of input boxes will appear prompting the user to answer questions about the opened window.
The browser does not need to be interacted with, only viewed, and I am trying to restore focus to the excel worksheet to allow for the prompts to be answered without needing to manually alt tab.
I have previously been able to do this with AppActivate, but recently, and for reasons I cannot discern, AppActivate will not restore focus to the worksheet. Strangely, it seems to impart a sort of quasi focus, as if I do not include the AppActivate line, the prompt will not appear until I manually restore focus to the workbook. If I do include the AppActivate line, the prompt will appear automatically, but I cannot interact with it until I manually restore focus to the workbook.
Apologies if this has been addressed before, but I've looked and cannot find anyone reporting a similar issue. Please note this is NOT a spelling issue. I have tried manually typing the workbook name into the code (e.g. AppActivate "worksheetname - Excel"), and it does not help.
Here is what I am trying to use.
Dim ref As String
ref = ThisWorkbook.Application.Caption
Do Until IsEmpty(ActiveCell.Value)
ThisWorkbook.FollowHyperlink (ActiveCell.Value)
Application.Wait (Now + TimeValue("0:00:05"))
AppActivate (ref)
ActiveCell.Offset(0,1).Select
ActiveCell.Value = InputBox("Question", "Options", default)
'after x prompts the code moves to the next hyperlink
ActiveCell.Offset(1,-x).Select
Loop