Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 ??? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 ??? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
ActiveCell.FormulaArray code - Get error | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming | |||
How to avoid error 2015 when using ActiveCell.Offsett in own function | Excel Programming | |||
Paste Error | Excel Programming |