Copy-Paste from one workbook to another

jahan reza

New Member
Joined
Feb 14, 2005
Messages
5
During running a macro, I am facing a problem of popup message box, giving following message

“ There is a large number of information on the clipboard. Do you want to be able to paste the information into the another program?
-To save it on the clipboard so that you can paste it later, click YES
- To delete, click NO”[/color]This occurs during open an workbook and then paste it on another workbook, I have to click YES for multiple time for multiple Workbook, though all the files in the folder are in loop, and does not automatically paste.


::::
fileWay = filePath & “\”&nameoffile & ".xls"
Workbooks.Open FileName:=fileWay

Range("C4:D30").Select
Selection.Copy

ActiveWorkbook.Close

'Select Sheet for copy to
Sheets("Run Data").Select

'Select Range for
Range("N1").Select

'Paste from Clipboard to active sheet
ActiveSheet.Paste
::::



How to fix this problem?
 

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.
I think you need this at the start
Application.DisplayAlerts = False

and this at the end

Application.DisplayAlerts = True
 
Upvote 0
if you just want this to be turned off try
Application.DisplayAlerts = False
at the start of your code then change false to true at the end


Stu
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,495
Members
449,088
Latest member
Melvetica

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