Delay running automatic macro

jrisebo

Active Member
Joined
Mar 15, 2011
Messages
312
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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I dont think the delay is my issue. I will start a new thread.
 
Upvote 0

Forum statistics

Threads
1,215,506
Messages
6,125,197
Members
449,214
Latest member
mr_ordinaryboy

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