Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
ActiveCell.FormulaArray code - Get error Kohai Excel Programming 4 August 30th 04 04:02 PM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM
How to avoid error 2015 when using ActiveCell.Offsett in own function Torben Laursen Excel Programming 2 February 18th 04 03:53 PM
Paste Error Marishah Warren Excel Programming 1 December 17th 03 08:31 AM


All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"