Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default new comer problems

Hi,

I am new to the Excell environment. I am trying to use the find method
from a visual basic program and i want to start the search after a
given cell. The code is something like this


Set c = .Range("b2").EntireColumn.Find(strItemCode, , , xlWhole)

The address i have from which I want the search to begin is a result
of a previous search. specifically it is c.address (the same c that
appears in the code). I didn't succeed to use this address as the
after parameter for the next find. How can i use this address? I am
sure I am doing something wrong but I just don't know what.

Thanks for the help.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default new comer problems

Try this:

Private Sub FindItAfter_C_Address()
Set c = Cells.Find(what:=strItemCode, _
after:=c.Address, LookIn:= xlValues, _
LookAt:=xlWhole, Searchorder:=xlByRows)
End Sub

-IA

-----Original Message-----
Hi,

I am new to the Excell environment. I am trying to use

the find method
from a visual basic program and i want to start the

search after a
given cell. The code is something like this


Set c = .Range("b2").EntireColumn.Find(strItemCode, , ,

xlWhole)

The address i have from which I want the search to begin

is a result
of a previous search. specifically it is c.address (the

same c that
appears in the code). I didn't succeed to use this

address as the
after parameter for the next find. How can i use this

address? I am
sure I am doing something wrong but I just don't know

what.

Thanks for the help.
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default new comer problems

dim sAddr as String, c as Range
With ActiveSheet
set c =.Range("b2").EntireColumn.Find(strItemCode, , , xlWhole)
if not c is nothing then
sAddr = c.Address
Do
c.Interior.colorindex = 5
set c = .Range("b2").EntireColumn.FindNext(c)
Until c.Address = sAddr
End if
End with
--
Regards,
Tom Ogilvy

"Eitan" wrote in message
om...
Hi,

I am new to the Excell environment. I am trying to use the find method
from a visual basic program and i want to start the search after a
given cell. The code is something like this


Set c = .Range("b2").EntireColumn.Find(strItemCode, , , xlWhole)

The address i have from which I want the search to begin is a result
of a previous search. specifically it is c.address (the same c that
appears in the code). I didn't succeed to use this address as the
after parameter for the next find. How can i use this address? I am
sure I am doing something wrong but I just don't know what.

Thanks for the help.



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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
PROBLEMS PROBLEMS!! HENRIETA Excel Discussion (Misc queries) 0 August 11th 08 07:46 PM
STILL Having VBA Problems!!!!!!! Elise148 Excel Discussion (Misc queries) 9 July 3rd 07 08:40 PM
SP3 problems Ron Weaver Excel Discussion (Misc queries) 3 March 19th 05 04:57 PM
VBA problems Andrew Clark Excel Discussion (Misc queries) 3 March 16th 05 09:33 PM


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