I solved the problem by letting VBA excecute Workbook_Open
event ASAP. I put the whole earlier content of Private Sub Workbook_Open
under “scraper” procedure and now it looks like this:
Private Sub Workbook_Open
Application.OnTime Now + TimeValue("00:00:01"), "scraper"
End Sub
It must be that Excel won’t (sometimes?) open the file before executing Workbook_Open event.
solved Excel – opening file stuck on 100%, until VBA code finishes