Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Search macro

carg

Dim Term As String
Term = Selection.Value
Cells.Find(What:=Term, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate

Gord Dibben Excel MVP

On Thu, 18 Nov 2004 10:47:31 -0600, carg1
wrote:


I'm trying to make a macro that copies the contents of a cell, pastes it
into the find dialog box, then searches for whatever was pasted. I
started it with a recording then tweaked it. Unfortunately, I came to
realize I'm not quite sure how to tell it to paste the copied data into
find. Any ideas? Here's my code:

Dim Term

Term = Selection.Copy
Cells.Find(What:="Term", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
MatchCase:=False).Activate


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
Macro for Search Brigette Excel Discussion (Misc queries) 6 December 17th 09 04:44 PM
Search Macro Gary Excel Discussion (Misc queries) 1 March 29th 07 04:53 PM
search macro laprosa Excel Discussion (Misc queries) 0 November 26th 04 05:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM


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