Copy data from one workbook to another

dan17602

New Member
Joined
Mar 20, 2011
Messages
9
Hi All,

I was wondering which is the fastest VBA script that would open a workbook
(This is currently based on a cell value "Workbooks.Open Cells(1, 1).Value). Copy data from the "Data" tab and paste it into "Data" on my current sheet. I have run a simple macro for this but it seems to take a long time to copy over

Any advise would be great

Thanks, Dan
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
dan17602,

If you have formulas in the worksheet you may need to turn the "Calculations" off when copying over.

At the start of the code place

Code:
Sub Test
Application.ScreenUpdating = False 
Application.Calculation = xlCalculationManual
''''' your code''''
''at the end of your code
Application.ScreenUpdating = True 
Application.Calculation =  xlCalculationAutomatic
End Sub
 
Upvote 0
Hi Charles,

Thank you for your response on this. Someone had a look at this with me today and they advised exacly the same. When this was added to the VBA the script runs in 5-6 seconds.

Thank you for your help

Dan
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,242
Members
452,898
Latest member
Capolavoro009

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