Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Change Settings in Find Dialog Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Elaine - 19 Feb 2007 06:12 GMT
I want a macro that will change the default setting in the Find or Find and
Replace dialog box to search by "columns" instead of rows, and look in
"values" instead of formulas.

I'm glad all of you are there to help people like me.
Signature

Thank you... Elaine

JE McGimpsey - 19 Feb 2007 09:48 GMT
One way:

Put this in the ThisWorkbook code module of your Personal.xls workbook:

   Private Sub Workbook_Open()
       Worksheets(1).Cells.Find What:=vbNullString, _
           LookIn:=xlValues, SearchOrder:=xlByColumns
   End Sub

Note that the Find dialog retains the settings of previous finds, so the
new "defaults" won't come up if you do a search by rows and look in
formulas.

> I want a macro that will change the default setting in the Find or Find and
> Replace dialog box to search by "columns" instead of rows, and look in
> "values" instead of formulas.
>
> I'm glad all of you are there to help people like me.
Elaine - 19 Feb 2007 22:32 GMT
This is what I have in the Personal Workbook and it does not work for me.
What am I doing wrong?
------------------------------------------------------------------------------
Sub Custom_Find_Dialog()
'
' Custom_Find_Dialog Macro
'

'
Private Sub Workbook_Open()
       Worksheets(1).Cells.Find What:=vbNullString, _
           LookIn:=xlValues, SearchOrder:=xlByColumns
End Sub
------------------------------------------------------------------------
Signature

Thank you so much for your help... Elaine

> One way:
>
[quoted text clipped - 14 lines]
> >
> > I'm glad all of you are there to help people like me.
JE McGimpsey - 19 Feb 2007 23:13 GMT
You shouldn't have the

   Sub Custom_Find_Dialog()

line. In fact, what you've shown *should* give you a compile error.

Make sure that the Workbook_Open() macro is in the ThisWorkbook module,
not a regular code module.

> This is what I have in the Personal Workbook and it does not work for me.
> What am I doing wrong?
[quoted text clipped - 30 lines]
> > >
> > > I'm glad all of you are there to help people like me.
Elaine - 19 Feb 2007 23:30 GMT
It works!!! I'm soooo glad for people like you that have the patience and
expertise to help others!!!
Signature

Thank you... Elaine

> You shouldn't have the
>
[quoted text clipped - 39 lines]
> > > >
> > > > I'm glad all of you are there to help people like me.
Dave Peterson - 19 Feb 2007 23:14 GMT
JE wrote to put this code:

   Private Sub Workbook_Open()
       Worksheets(1).Cells.Find What:=vbNullString, _
           LookIn:=xlValues, SearchOrder:=xlByColumns
   End Sub

behind the ThisWorkbook module in your personal.xls workbook's project.

Don't try to bury it in an existing subroutine (like custom_find_document).

By using Workbook_Open under ThisWorkbook, then the code will run each time
excel opens this file.  By using personal.xls (in your XLStart folder), excel
will open that file each time it starts.

> This is what I have in the Personal Workbook and it does not work for me.
> What am I doing wrong?
[quoted text clipped - 31 lines]
> > >
> > > I'm glad all of you are there to help people like me.

Signature

Dave Peterson

Elaine - 19 Feb 2007 23:31 GMT
What incredible people all of you are!!!
Signature

A BIG thank you... Elaine

> JE wrote to put this code:
>
[quoted text clipped - 46 lines]
> > > >
> > > > I'm glad all of you are there to help people like me.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.