Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Need simple 'Paste' macro code

You don't need to do the select - paste method. PasteVar can be used later
to write to addtional cells. The Learn Macro always uses the Select method
when just direct reads and writes of cells is better when manually writing
code.

Sub abc()
' Macro2 Macro
' Macro recorded 4/14/2007 by us
'
PastVar = Sheets("sheet2").Range("a1")
ActiveCell = PastVar
'
End Sub

" wrote:

I have a seemingly hard to find request....

I want to find or get guidance on code that will paste previously
copied data to a specified cell (not a currently active.

Essentially, I've create macros (and assigned a button form) in other
active sheets of my document that copy the contents of a specified
cell (eg - in the Data Worksheet, the Macro button copies the contents
of cell B23.) I have 3 of these macros (with button form) in the Data
Worksheet to copy; one button assigned to copy B10, another B23 and
another B35. All copy flawlessly

My intent is to paste the contents of whatever cell was copied from
above Data Worksheet to a single/specified targeted cell in a
Worksheet titled - Remarks.

So, no matter which one of the above copy macros were used, I would
like to paste that to cell A10 on the Remarks worksheet every time. I
don't want the code to use whatever active cell the cursor is
currently in (which is as far as I got on my macro code) but only to
one specific cell predetermined by being nested in the code. Once the
code is created, I will assign it to a button form.

(current code...that doesn't do what I want....)
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 4/14/2007 by us
'
' Range("a1").Select
ActiveSheet.Paste
'
End Sub

I've searched but only find quite complicated functions with multiple
steps (copy/insert/paste) that I cannot extract good enough code to do
my simple little deal.

It's funny but I'm creating a sheet for my employees to use for
consistent remarking and am using the macros and buttons to make them
fool proof and thus why such simple stuff.....


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
Simple Macro - I think... Copy - Paste on Click Scott Campbell[_2_] Excel Discussion (Misc queries) 5 November 14th 12 12:52 AM
Excel 2007 - Macro to do a simple cut/paste operation. Grindy Excel Discussion (Misc queries) 2 January 26th 09 01:11 AM
How to write a simple copy-paste macro? R. H. Rosenberg New Users to Excel 4 November 25th 06 12:26 AM
Macro newbie - simple copy/paste function Nat Excel Programming 2 August 16th 06 05:37 PM
Simple Cut & Paste Macro needed :) dstock[_13_] Excel Programming 7 June 22nd 05 03:08 PM


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

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"