Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
maybe
Set c = .Range("b2").EntireColumn.Find(strItemCode, , , xlWhole Sub findafter() strItemCode = "a" With ActiveSheet Set c = .Columns(2).Find(strItemCode, after:=Range("b2")) End With MsgBox c.Address End Sub -- Don Guillett SalesAid Software "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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
PROBLEMS PROBLEMS!! | Excel Discussion (Misc queries) | |||
STILL Having VBA Problems!!!!!!! | Excel Discussion (Misc queries) | |||
SP3 problems | Excel Discussion (Misc queries) | |||
VBA problems | Excel Discussion (Misc queries) |