delay between lines in macro

leibale

Active Member
Joined
Sep 12, 2002
Messages
337
I have a macro with 3 lines. all of them open action query
the first kill all records in a table. the second - add new records to the same table,
the third line create a new table based on step 2
I got bad results. the new table is not refress and the contens remain as it was before
if I am doing the same task step by step manualy - every thing is ok
I thought about puting a delay between the lines/
any other idea
thanks
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
This doesnt sound possible. If you run the queries manual, and it works, and the same queries run in the macro, then it has to work.
Did you try running the macro 1 step at a time?
put a STOPALLMACROS after the 1st step,
run and see if it works. if so, move the STOP after the 2nd line. repeat.
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,796
Members
449,095
Latest member
m_smith_solihull

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