Search from highlighted cell

Search from highlighted cell

Post by QnRvYmluM » Tue, 30 May 2006 12:42:01


I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?
 
 
 

Search from highlighted cell

Post by C01d » Tue, 30 May 2006 12:54:58


Instead of using Range("A1") in your code, use ActiveSheet.UsedRange.
This property represents the currently selected range in your
worksheet.


--
C01d
------------------------------------------------------------------------
C01d's Profile: http://www.yqcomputer.com/
View this thread: http://www.yqcomputer.com/

 
 
 

Search from highlighted cell

Post by Dave Peter » Tue, 30 May 2006 21:53:30

Actually, Selection would refer to the current selected range.

Activesheet.usedrange refers to what the range that excel thinks has been used.



--

Dave Peterson
 
 
 

Search from highlighted cell

Post by Dave Peter » Tue, 30 May 2006 21:54:18

In the .find statement

..., After:=activecell, ...

or specify whatever cell you want to use.





--

Dave Peterson
 
 
 

Search from highlighted cell

Post by QnRvYmluM » Wed, 31 May 2006 08:38:01

you have a period at the end of used range. is there more to it?
 
 
 

Search from highlighted cell

Post by QnRvYmluM » Wed, 31 May 2006 08:46:01

ok here is my code snippet. I am trying to get the A1 turned to the
activesheet.used range. How do I set this up?

Workbooks.Open Filename:= _
"http://total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"
 
 
 

Search from highlighted cell

Post by Dave Peter » Wed, 31 May 2006 09:22:40

I don't understand how this fits into a Search. I guessed you were doing the
same thing as Edit|Find in code.

Maybe you could restate your question.






--

Dave Peterson
 
 
 

Search from highlighted cell

Post by QnRvYmluM » Wed, 31 May 2006 09:30:01

Right now Ihae it wher in the code below, if information is added to A1 then
it will fil out the rest of this web link and then run a macro to copy and
paste. I want A1 to be any cell in the worksheet.
 
 
 

Search from highlighted cell

Post by Dave Peter » Wed, 31 May 2006 09:35:13

How do you know what cell to process? Is it the activecell?

Workbooks.Open Filename:= _
"http://total." & activecell.value & "." & activecell.value & ".htm"

(Did you really want that value duplicated?)








--

Dave Peterson
 
 
 

Search from highlighted cell

Post by QnRvYmluM » Wed, 31 May 2006 09:42:02

unfortunately, that is how the web content was setup. not my choice, I just
have to work with it.