ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find feature defaults to look in formulas (https://www.excelbanter.com/excel-discussion-misc-queries/122926-find-feature-defaults-look-formulas.html)

dford

Find feature defaults to look in formulas
 
In 2003 the find feature defaults to look in formulas. Is there a way to have
it default to look in values?

dford

Find feature defaults to look in formulas
 
Can someone help here?

"dford" wrote:

In 2003 the find feature defaults to look in formulas. Is there a way to have
it default to look in values?


Nick Hodge

Find feature defaults to look in formulas
 
Not that I know of

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"dford" wrote in message
...
Can someone help here?

"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

Find feature defaults to look in formulas
 
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

dford

Find feature defaults to look in formulas
 
Thanks Dave. That is helpful.

"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


Nick Hodge

Find feature defaults to look in formulas
 
Dave

That appears to be the only way (Which IMO is a little overkill). I was
hoping book.xlt may work, but tested that and nada :-((

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Dave Peterson" wrote in message
...
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

Find feature defaults to look in formulas
 
Maybe a better home would be personal.xl* (without the .close statement).

I don't think I'd want something like this in my workbook template anyhow.

Nick Hodge wrote:

Dave

That appears to be the only way (Which IMO is a little overkill). I was
hoping book.xlt may work, but tested that and nada :-((

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk

"Dave Peterson" wrote in message
...
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

dford

Find feature defaults to look in formulas
 
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

Find feature defaults to look in formulas
 
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

dford

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


Dave Peterson

Find feature defaults to look in formulas
 
On what line?

dford wrote:

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


--

Dave Peterson

dford

Find feature defaults to look in formulas
 
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" wrote:

On what line?

dford wrote:

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


--

Dave Peterson


Dave Peterson

Find feature defaults to look in formulas
 
Try:

with Worksheets("sheet1").
.Cells.Find What:="", After:=.cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
end with



dford wrote:

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" wrote:

On what line?

dford wrote:

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


--

Dave Peterson


--

Dave Peterson

Dave Peterson

Find feature defaults to look in formulas
 
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



Dave Peterson wrote:

Try:

with Worksheets("sheet1").
.Cells.Find What:="", After:=.cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
end with

dford wrote:

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" wrote:

On what line?

dford wrote:

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


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

dford

Find feature defaults to look in formulas
 
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" wrote:

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



Dave Peterson wrote:

Try:

with Worksheets("sheet1").
.Cells.Find What:="", After:=.cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
end with

dford wrote:

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" wrote:

On what line?

dford wrote:

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


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


Dave Peterson

Find feature defaults to look in formulas
 
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.

dford wrote:

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" wrote:

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



Dave Peterson wrote:

Try:

with Worksheets("sheet1").
.Cells.Find What:="", After:=.cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
end with

dford wrote:

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" wrote:

On what line?

dford wrote:

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


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

dford

Find feature defaults to look in formulas
 
The code seems to run without errors but the find feature still defaults to
Sheet & Formulas instead of Workbook & values.

"Dave Peterson" wrote:

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.

dford wrote:

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" wrote:

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



Dave Peterson wrote:

Try:

with Worksheets("sheet1").
.Cells.Find What:="", After:=.cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
end with

dford wrote:

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" wrote:

On what line?

dford wrote:

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


--

Dave Peterson


--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


Dave Peterson

Find feature defaults to look in formulas
 
Excel's VBA doesn't allow you to change the workbook/sheet option.

I don't have a guess why formulas would still be showing up for you. That part
worked fine for me.

dford wrote:

The code seems to run without errors but the find feature still defaults to
Sheet & Formulas instead of Workbook & values.

"Dave Peterson" wrote:

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.

dford wrote:

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" wrote:

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



Dave Peterson wrote:

Try:

with Worksheets("sheet1").
.Cells.Find What:="", After:=.cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
end with

dford wrote:

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" wrote:

On what line?

dford wrote:

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


--

Dave Peterson


--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

dford

Find feature defaults to look in formulas
 
You are correct. Formulas did change to values. I missed that. If it is not
possible to change from sheet to workbook, I will have to just click a couple
more times. if you or anyone else comes up with a solution in the future,
please let me know. Thanks for your help.

"Dave Peterson" wrote:

Excel's VBA doesn't allow you to change the workbook/sheet option.

I don't have a guess why formulas would still be showing up for you. That part
worked fine for me.

dford wrote:

The code seems to run without errors but the find feature still defaults to
Sheet & Formulas instead of Workbook & values.

"Dave Peterson" wrote:

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.

dford wrote:

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" wrote:

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



Dave Peterson wrote:

Try:

with Worksheets("sheet1").
.Cells.Find What:="", After:=.cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False
end with

dford wrote:

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" wrote:

On what line?

dford wrote:

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


--

Dave Peterson


--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson



All times are GMT +1. The time now is 08:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com