View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steve Slechta[_2_] Steve Slechta[_2_] is offline
external usenet poster
 
Posts: 5
Default Use of Selection.Find & ActiveCell

Arrrghhh..... I've been testing this code with much
frustration.

-Office 2000
I have a Variant called Value1 that's used to track which
cell is highlighted in a column of text data (email
addresses). I use the ActiveCell command when I select the
address that I want:

Cells(Row, Col).Select
Value1 = ActiveCell

I then try to find the data from Value1 in another column
of email address data with this:

Columns("C:C").Select
Selection.Find(what:=Value1).Activate

This results in the error:

Run-time error '91': Object Variable or With block
variable no set.

Now as a test, if I change the line:

Value1 = ActiveCell to
Value1 = ;"

The code does not error. Any clues???

When I'm using ActiveCell, the cell does contain
;. I step through the program and put
Value1 and ActiveCell in the Watch list and everything
appears OK up to the Selection.Find line. I've also tried
redefining Value1 as an integer, string, etc with no
luck....

Thanks for any help that can be provided!

Steve Slechta