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?
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

cherria

Well-known Member
Joined
Nov 17, 2004
Messages
708
I think you need this at the start
Application.DisplayAlerts = False

and this at the end

Application.DisplayAlerts = True
 

stuartford

Active Member
Joined
Nov 28, 2002
Messages
419
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,215
Messages
5,594,883
Members
413,947
Latest member
gizmolucy

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
Top