I have code that runs when the spreadsheet is opened, but the spreadsheet has to refresh data from a query first, then I want the code to run. It seems to only run the last call I have. See code.
Only my last call ends up running. Anyway to delay it until the query loads, or run it again after a delay?
VBA Code:
Private Sub Workbook_open()
Call userontop
Call getname
Call Createdbysort
Call JDR_Click
Call ELM_Click
Call CMS_Click
Call KMH_Click
Call JAL_Click
Call DM_Click
Call KDK_Click
Call JMF_Click
Call SP_Click
Call MGC_Click
Call DN_Click
Call PAC_Click
Call RKL_Click
Call userontop
End Sub
Only my last call ends up running. Anyway to delay it until the query loads, or run it again after a delay?