Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy/Paste Problem

Hi,
I am having trouble recording a macro that will copy the text in a
cell, and paste it into the Find box, and then find the text (on a
seperate worksheet). The macro Finds the text that is in the cell when
I recorded it, but I want it to find was is there at the time that I
run the macro.

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy/Paste Problem

More Specifically, I want the macro to work as follows:
1. Go to a specific Cell
2. Copy to the clipboard all the text in that cell.
3. Paste what it copied into the Find box.
4. Go to a specific worksheet.
5. Go to the first cell (Control+home).
6. Paste what's on the clipboard into the Find Box and Find.
7. Select the contents of that cell, and Copy it to the clipboard.
8. Go to a specific worksheet and a specific cell, and paste the
contents of the clipboard in it.
8. Go to a specific worksheet and cell, and copy the clipboard contents
into it.

FOLLOWING IS THE CODE AS IT WAS RECORDED, WITH MY COMMENTS IN IT TO
POINT OUT WHAT'S WRONG WITH IT.
__________________________________________________ ____________________
Sub Macro5()
'
Application.Goto Reference:="R9C7"
ActiveCell.Range("A1:T1").Select
ActiveCell.FormulaR1C1 = "1 2 b3 4 5 6 b7" [WRONG! COPY WHATEVER IS
IN THERE AT THE TIME I RUN THE MACRO]
Sheets("SCIT").Select
Application.Goto Reference:="R1C1"
Cells.Find(What:="1 2 b3 4 5 6 b7", After:=ActiveCell,
LookIn:=xlFormulas _[WRONG! FIND WHATEVER IS IN THERE AT THE TIME I RUN
THE MACRO]
, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False).Activate
ActiveCell.Select
ActiveCell.FormulaR1C1 = "1 2 b3 4 5 6 b7 " [WRONG! ACTIVATE
WHATEVER IS FOUND THERE AT THE TIME I RUN THE MACRO]
Sheets("FINDER").Select
Application.Goto Reference:="R34C7"
ActiveCell.Select
ActiveCell.FormulaR1C1 = _
"Major-Mode 1 - Ionian (The Major Scale) 1 2 b3 4 5 6 b7 "
[WRONG! THE TEXT SHOULD BE WHATEVER IS IN THERE AT THE TIME I RUN THE
MACRO]
ActiveCell.Offset(1, 0).Range("A1").Select
End Sub
:(



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

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
problem with copy and paste Tomek Excel Discussion (Misc queries) 2 February 7th 09 12:49 PM
Copy Paste problem Ian_Add Excel Discussion (Misc queries) 3 January 11th 08 02:47 PM
Copy/Paste Problem Seti Excel Worksheet Functions 0 August 31st 06 05:10 PM
Copy and Paste Problem Skc Excel Discussion (Misc queries) 1 March 8th 06 07:21 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM


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