Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Cut and Paste Macro

I am trying to create a Macro that cuts some preset text and pastes it
to the cell that I currently have selected. I created a button and
linked it to a macro with the following code:

Sub Macro1()
Range("A1:C1").Select
Range("C1").Activate
Selection.Copy
Range("A8").Select
ActiveSheet.Paste
End Sub

The problem is that it always copies the code to cell A8. I see
where like 5 does this, but I haven't been able to find the command
which always puts it in the currently selected cell.

Your help is appreciated.

Price
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Cut and Paste Macro

This will do. Select the target cell, press the button.

Sub Macro1()
Range("A1:C1").Copy
ActiveSheet.Paste
End Sub


-----Original Message-----
I am trying to create a Macro that cuts some preset text

and pastes it
to the cell that I currently have selected. I created a

button and
linked it to a macro with the following code:

Sub Macro1()
Range("A1:C1").Select
Range("C1").Activate
Selection.Copy
Range("A8").Select
ActiveSheet.Paste
End Sub

The problem is that it always copies the code to cell

A8. I see
where like 5 does this, but I haven't been able to find

the command
which always puts it in the currently selected cell.

Your help is appreciated.

Price
.

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
run macro after paste K Excel Worksheet Functions 3 October 28th 08 09:06 AM
Cut and Paste Macro M.A.Tyler Excel Discussion (Misc queries) 3 April 28th 07 02:50 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM
Cut&Paste Macro [email protected] Excel Worksheet Functions 5 April 8th 05 03:51 PM


All times are GMT +1. The time now is 06:44 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"