Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with find macro.
hi i am getting an error message of "runtime 91: Object variable or with block variable not set" this is my code: Sub test2() Dim cell As Object Dim strFileFound As String For Each cell In Range("a11:a56") cell.Activate Range("i11").Select Selection.CurrentRegion.Select strFileFound = Selection.Find(what:=ActiveCell.Value & " for " & Range("e4").Value, LookIn:=xlValues, lookat:=xlPart).Value If strFileFound < "" Then ActiveCell.Offset(0, 1).Value = "Found" Beep Next cell End Sub It keeps on highlighting the line which starts with "strfilefound..." -- funkymonkUK ------------------------------------------------------------------------ funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135 View this thread: http://www.excelforum.com/showthread...hreadid=538409 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro-find and sum | Excel Discussion (Misc queries) | |||
Get Macro warning, but can't find Macro | Excel Worksheet Functions | |||
change error message when no more for "find" in macro to find | Excel Programming | |||
Using Find in a macro | Excel Discussion (Misc queries) | |||
I need to find a macro to find data cut and paste to another colu. | Excel Programming |