![]() |
Error with Activecell.paste
I am using Excel 97.
I had a macro that has been working for the longest time. I have not changed anything. This is the problem. The code copy several rows of data from one spreadsheet. Then goes to a new spreadsheet. Then click on a single cell in the new sheet. The macro issues the command : ActiveSheet.paste The macro crashes. I have tried to pick a range that is the same size as the area that I am trying to paste. That did not work. I tried picking a single cell. That did not work. What can I do to fix this ??? |
Error with Activecell.paste
Hi Rich,
The following copies a range (A1:P20) from Sheet1 to a range anchored on A1 in Sheet2: Sub Tester02() Dim RngSrc As Range Dim Rngdest As Range With ActiveWorkbook Set RngSrc = .Sheets("Sheet1").Range("A1:P20") Set Rngdest = .Sheets("Sheet2").Range("A1") End With RngSrc.Copy Rngdest End Sub --- Regards, Norman "Rich" wrote in message om... I am using Excel 97. I had a macro that has been working for the longest time. I have not changed anything. This is the problem. The code copy several rows of data from one spreadsheet. Then goes to a new spreadsheet. Then click on a single cell in the new sheet. The macro issues the command : ActiveSheet.paste The macro crashes. I have tried to pick a range that is the same size as the area that I am trying to paste. That did not work. I tried picking a single cell. That did not work. What can I do to fix this ??? |
All times are GMT +1. The time now is 06:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com