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.
Elaine wrote:
>
> 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
> ------------------------------------------------------------------------
> --
> Thank you so much for your help... Elaine
>
> "JE McGimpsey" wrote:
>
> > 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.
> >
> >
> >
> > In article <D370379D-72A1-43F7-908E-(E-Mail Removed)>,
> > Elaine <(E-Mail Removed)> wrote:
> >
> > > 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.
> >
--
Dave Peterson
|