VBA Refresh data and copy worksheet, paste values only.

natheplas

Board Regular
Joined
Aug 28, 2016
Messages
97
Hi All,

I've built a workbook that calculates OTIF for our orders for work.

The issue I have is the workbook now contains so much data, excel hangs when refreshing and unless I leave it for 30mins, it crashes.

I want to know if it's possible to have a VBA that runs, so it refreshes the data, saves it and also copies the worksheet I am interested in.

Saving the summary sheet to another workbook, but pasting values only.

The reason I need it like this is because, I can't copy and paste the cells without it crashing.

However, if I can set up an automated routine with a batch file, that refreshes, saves and copies values to another workbook that would be ideal.

Please can someone help me with this? Please let me know if you need any more information.

Thank you
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
can be done with vba but first maybe you can clean up your workbook ?
shouldnt take 30 mins for anything
 
Upvote 0
It's because it's linked to a Sage 50 database across a big network. So it's refreshing slowly, then it has a few array formulas in there which seem to make it even slower.

Not sure how I could make it cleaner really.

We will have SQL soon, so reports like this will run no problem, however, before that happens it's a struggle.
 
Upvote 0
An option would be with VBA:
* Refresh Data
* Write formulas to cells
* Convert formulas to values

Would imagine this would speed things up a fair bit
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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