Posted to microsoft.public.excel.misc
|
|
Find feature defaults to look in formulas
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.
"Dave Peterson" wrote:
You could fiddle with the workbook setting by using sendkeys. But I don't think
there's any other way to get to that setting.
But you could modify that other macro to look more like this:
Option Explicit
Sub auto_open()
ThisWorkbook.Windows(1).Visible = False
Worksheets("sheet1").Cells.Find What:="", After:=ActiveCell, _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
Application.Dialogs(xlDialogFormulaFind).Show
ThisWorkbook.Close savechanges:=False
End Sub
dford wrote:
Is there a way to create a macro within the worksheet I am using to open the
find window, change to workbook, change to values, and leave the window open?
"Dave Peterson" wrote:
Saved from a previous post:
Excel tries to help by remembering the last settings you used--except for the
first search in that session.
You can use that to your advantage.
You could make a dummy workbook and put it in your xlStart folder. Have a
macro in that workbook that does a find (and sets all the stuff the way you
like). Then closes and gets out of the way.
Option Explicit
Sub auto_open()
Worksheets("sheet1").Cells.Find What:="", After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
ThisWorkbook.Close savechanges:=False
End Sub
The workbook opens, does a find (to fix your settings) and then closes to get
out of the way.
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
But if you do an Edit|Find and change anything, then those changed settings will
be remembered.
dford wrote:
In 2003 the find feature defaults to look in formulas. Is there a way to have
it default to look in values?
--
Dave Peterson
--
Dave Peterson
|