Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No ... but you will get an error if no match is found.
From VBA help .... With Worksheets(1).Range("a1:a500") Set c = .Find(2, lookin:=xlValues) If Not c Is Nothing Then firstAddress = c.Address Do c.Value = 5 <=== irow=c.row Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address < firstAddress End If End With "Celt" wrote: Thanks Toppers! That worked. Can I ask you another question? Is the statement: irow = rngBS3.Row need a "Set" infront of it? I am getting an "Object variable or With block variable not set" error here. I have used "icol = -rngname-.Column" in a similar manner and had no problems. Thanks for you help! -- Celt ------------------------------------------------------------------------ Celt's Profile: http://www.excelforum.com/member.php...o&userid=19413 View this thread: http://www.excelforum.com/showthread...hreadid=530210 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error '50290': Application-defined or object-defined erro | Excel Discussion (Misc queries) | |||
Runtime error 1004- application defined or object defined erro | Excel Programming | |||
Runtime error 1004- application defined or object defined erro | Excel Programming | |||
Runtime error 1004- application defined or object defined erro | Excel Programming | |||
Application-Defined or Object-Defined Error on simple code | Excel Programming |