I am currently trying to implement a button that simply refreshes the data in my workbook and then exports a specific sheet as a PDF. Everything works fine except that the refresh does not finish until after the PDF is created. The link below seemed to be an answer but it still does not work:
works properly for refreshing the workbook but it starts, gets interrupted by my code to export as a PDF, and then finishes. The article I linked states that
should be used if I wanted synchronous behaviour and for the refresh to finish before anything else occurs. However, when I use the button with this line, nothing happens. I thought maybe it was my version and that mine does not allow for the second type of refreshing but I am not sure how I can check.
Any help would be appreciated.