LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Pasting in an Excel Macro

I have a file that I'm trying to perform some calculations in (via a macro)
and then a macro file to simply store the macro. All I'm trying to do is to
copy a cell, then highlight a area and then paste. Instead of pasting in my
working file, it is pasting in my Macro file!

Any idea how I force it to paste in my working file? (i.e. the same place
from which it copies the value) Here's my code:

ActiveCell.Select
Selection.Copy
ActiveCell.Offset(0, -1).Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Range("A1").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
ActiveCell.Columns("A:A").EntireColumn.Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(1, 0).Range("A1").Select
Application.CutCopyMode = False

Thanks.
 
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
macro for pasting CMD Excel Discussion (Misc queries) 2 May 26th 06 10:03 PM
Excel 1004 Error When Pasting Special W/ Macro setoFairfax Excel Discussion (Misc queries) 2 April 27th 05 02:28 PM
Pasting from Excel Clipboard with VBA Macro ExcelPeter218 Excel Programming 2 February 10th 05 02:04 AM
Pasting text from Excel to Word (macro) TT[_2_] Excel Programming 1 January 25th 05 01:23 AM
Excel Macro code help - re pasting rows bjmccready[_2_] Excel Programming 2 June 24th 04 01:10 PM


All times are GMT +1. The time now is 08:27 AM.

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

About Us

"It's about Microsoft Excel"