Build in Cushion between Modules being Called

reberryjr

Well-known Member
Joined
Mar 16, 2017
Messages
701
Office Version
  1. 365
Platform
  1. Windows
I'm having an issue where data is getting "jumbled" on a worksheet. There are only 2 modules that update this particular worksheet and I cannot replicate the issue when I step through each module, nor when I run them manually. My thought is that the "parent" module that is calling these 2 modules is "overloaded". It currently calls 38 modules in total, with 34 of those importing data from other excel files. I have this snippet after every module that is called. Do I need to increase the increment, or is there another/better way to build in a cushion (DoEvents perhaps)?
VBA Code:
    Application.Wait (Now + TimeValue("00:00:01"))
 
Again, without the code it's only guesswork.
But if you are sorting and filtering the data itself and you are importing data in the sam place - I would say this is a bad decision.
At least IMHO.
I have to import the data to get it into the master workbook. I then have to sort certain data elements so that they are in the order my customer wants them in. I have to filter the data so that I can isolate certain values to perform various actions on or with those values.
 
Upvote 0

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.
Sorting can be tricky and can be a solid base for "jumbling".
Are you storing data in a table object or simply a range on the sheet?
 
Upvote 0
Sorting can be tricky and can be a solid base for "jumbling".
Are you storing data in a table object or simply a range on the sheet?
This particular data is in a worksheet. My customers came up with more requirements that tripled the data being leveraged. Optimization will come after this gets rolled out due to timeline constraints. However, it appears that the issue was a filter not being cleared before running more code. So far, fixing that appears to have fixed the issue. Hopefully my continued testing won't prove that hope incorrect.
 
Upvote 0

Forum statistics

Threads
1,215,077
Messages
6,122,992
Members
449,094
Latest member
masterms

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