slowing down a macro?

orsm6

Active Member
Joined
Oct 3, 2012
Messages
496
Office Version
  1. 365
Platform
  1. Windows
is there any possible way to stop a macro until the workbook it needs to have open is opened? My macro runs a T-code in SAP that exports a report as a spreadsheet. there is some delay in how long that takes but once SAP has generated the report is automatically opens. the problem is my macro has run all of the code before it opens and so none of the data is copied.

thanks :)
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
i worked out a different way.... force the workbook open rather than wait for SAP to open it.
 
Upvote 0
I see that you have a workaround but I'll post it anyway as I had already typed it and so maybe you could try
VBA Code:
DoEvents
or
VBA Code:
Application.Wait Now + TimeValue("00:00:05")
 
Upvote 0
I see that you have a workaround but I'll post it anyway as I had already typed it and so maybe you could try
VBA Code:
DoEvents
or
VBA Code:
Application.Wait Now + TimeValue("00:00:05")

i'll hold onto this also :) thanks
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,824
Members
449,050
Latest member
Bradel

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