Delay running automatic macro

jrisebo

Active Member
Joined
Mar 15, 2011
Messages
311
Office Version
  1. 365
Platform
  1. Windows
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.

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?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I dont think the delay is my issue. I will start a new thread.
 
Upvote 0

Forum statistics

Threads
1,214,988
Messages
6,122,620
Members
449,092
Latest member
amyap

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top