can't copy between workbooks

Erich Duff

Board Regular
Joined
Apr 20, 2005
Messages
129
All,

This is driving me crazy. I have a workbook that has lots of coding and formatting, etc. When I copy cells in that workbook and go to another workbook, there's nothing on the clipboard. It'll let me copy within its own workbook, just not to any other ones. And all other workbooks let me copy between them no problem. It only seems to be that first workbook that has that problem. Any ideas what might cause that?

Erich
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

jimboy

Well-known Member
Joined
Apr 11, 2002
Messages
2,314
Hi - you problably an event that disables the copy.

Open VB (Alt F11) and insert a new module (Insert>Module) and copy this code in;

Code:
Sub switch_off()
Application.EnableEvents = False
End Sub

Sub switch_on()
Application.EnableEvents = True
End Sub

Run switch_off and copy and paste your data, then run the switch_on macro.
 

Erich Duff

Board Regular
Joined
Apr 20, 2005
Messages
129
Thanks, Jimboy!!! works perfectly. I can't for the life of me figure out which code is messing it up to begin with, but it'll give me something to think about this weekend.

Cheers

Erich
 

jimboy

Well-known Member
Joined
Apr 11, 2002
Messages
2,314
It's either in the workbook your copying from or the workbook you are pasting to.

First, select the wb you are copying from and open vb, press control R to view the project (usually on the left) - find the project for you wb and double click on ThisWorkbook, this will open the module on the right. If there is no code in this module do the same for the wb you are pasting into.

If there is no code in either sheet then it must me code from the sheet, above ThisWorkbook are the modules for each sheet, double click on both sheets and you should find some code.

When you find the code go to the first line of code and press F9 this will insert a break (control shift F9 to remove the break) before the code runs vb will open with that line selected, press F8 to run the selected line - one of these lines is causing the copy functoin to stop.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,804
Messages
5,638,455
Members
417,025
Latest member
MusterDuster

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