I have data that daily needs to be refreshed and printed to pdf.
I figure the simplest way to do this would be to task schedule the workbook to open daily.
Then on open it will refresh the data, print it after all data has been refreshed and close the workbook.
I set it up originally without the need to print so I have all the queries set to refresh when opening the file, however when I now try and put the code to print to pdf on the workbook open event it runs before the queries are finished running.
(Query notes:
queries were created through Microsoft query, and are accessing a MySQL database
queries set to refresh when opening the file
queries set to enable background refresh).
I am very new to scripting so if anybody could provide simple step by step instructions on how I could do this it would be greatly appreciated
Bookmarks