D
dford
In 2003 the find feature defaults to look in formulas. Is there a way to have
it default to look in values?
it default to look in values?
I still do not have this figured out yet. When I run the code below I get the
error - Runtine error 1004
Method 'worksheets' of object_global' failed.
This code is all yellow in debuger
Worksheets("sheet1").Cells.Find What:="", After:=ActiveCell, _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
Dave Peterson said:In fact, use this instead:
with ThisWorkbook.Worksheets("sheet1").
.Cells.Find What:="", After:=.cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
end with
I get a
Compile error:
Syntax error:
Starting with the line below.
with ThisWorkbook.Worksheets("sheet1").
The above test was red
Maybe I'm entering the code improperly. I inserted a new module, named the
macro ChangeFindDefault, inserted your code between the name and End Sub.
Dave Peterson said:Drop that final period.
with ThisWorkbook.Worksheets("sheet1").
becomes
with ThisWorkbook.Worksheets("sheet1")
Make sure that there's a worksheet named Sheet1 in that workbook, too.
The code seems to run without errors but the find feature still defaults to
Sheet & Formulas instead of Workbook & values.