+ Reply to Thread
Results 1 to 4 of 4

"Find" expression won't work

  1. #1
    Harold Good
    Guest

    "Find" expression won't work

    Hi, I know little about VBA, so I've recorded a macro and pasted (see below)
    it into the VBA window. It works great as a macro, but won't work when I run
    it in VBA. I end up with Run-time error '1004'.

    This VBA code will work fine on a different worksheet, but not on this
    "Progress" sheet. I've tried everything I can think of but can't get it to
    run. The term "bottomofaddnewrows" does exist, and can be found by the
    macro.

    Any help would be appreciated.

    Harold

    ============================
    Sheets("Progress").Select
    Cells.Find(What:="bottomofaddnewrows", After:=ActiveCell, LookIn:= _
    xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
    xlNext, MatchCase:=False, SearchFormat:=False).Activate



  2. #2
    Don Guillett
    Guest

    Re: "Find" expression won't work

    both worked
    Sub findbottom()
    'Sheets("sheet5").Select
    'Cells.Find("bot").Activate
    'or BETTER
    Application.Goto Sheets("sheet5").Cells.Find("bot")
    End Sub

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Harold Good" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi, I know little about VBA, so I've recorded a macro and pasted (see
    > below) it into the VBA window. It works great as a macro, but won't work
    > when I run it in VBA. I end up with Run-time error '1004'.
    >
    > This VBA code will work fine on a different worksheet, but not on this
    > "Progress" sheet. I've tried everything I can think of but can't get it to
    > run. The term "bottomofaddnewrows" does exist, and can be found by the
    > macro.
    >
    > Any help would be appreciated.
    >
    > Harold
    >
    > ============================
    > Sheets("Progress").Select
    > Cells.Find(What:="bottomofaddnewrows", After:=ActiveCell, LookIn:= _
    > xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
    > _
    > xlNext, MatchCase:=False, SearchFormat:=False).Activate
    >




  3. #3
    Harold Good
    Guest

    Re: "Find" expression won't work

    So simple but yet it works great! Thanks for your help, Don!

    Harold

    =====================
    "Don Guillett" <[email protected]> wrote in message
    news:[email protected]...
    > both worked
    > Sub findbottom()
    > 'Sheets("sheet5").Select
    > 'Cells.Find("bot").Activate
    > 'or BETTER
    > Application.Goto Sheets("sheet5").Cells.Find("bot")
    > End Sub
    >
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "Harold Good" <[email protected]> wrote in message
    > news:%[email protected]...
    >> Hi, I know little about VBA, so I've recorded a macro and pasted (see
    >> below) it into the VBA window. It works great as a macro, but won't work
    >> when I run it in VBA. I end up with Run-time error '1004'.
    >>
    >> This VBA code will work fine on a different worksheet, but not on this
    >> "Progress" sheet. I've tried everything I can think of but can't get it
    >> to run. The term "bottomofaddnewrows" does exist, and can be found by
    >> the macro.
    >>
    >> Any help would be appreciated.
    >>
    >> Harold
    >>
    >> ============================
    >> Sheets("Progress").Select
    >> Cells.Find(What:="bottomofaddnewrows", After:=ActiveCell, LookIn:= _
    >> xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
    >> _
    >> xlNext, MatchCase:=False, SearchFormat:=False).Activate
    >>

    >
    >




  4. #4
    Don Guillett
    Guest

    Re: "Find" expression won't work

    happy to help

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Harold Good" <[email protected]> wrote in message
    news:[email protected]...
    > So simple but yet it works great! Thanks for your help, Don!
    >
    > Harold
    >
    > =====================
    > "Don Guillett" <[email protected]> wrote in message
    > news:[email protected]...
    >> both worked
    >> Sub findbottom()
    >> 'Sheets("sheet5").Select
    >> 'Cells.Find("bot").Activate
    >> 'or BETTER
    >> Application.Goto Sheets("sheet5").Cells.Find("bot")
    >> End Sub
    >>
    >> --
    >> Don Guillett
    >> SalesAid Software
    >> [email protected]
    >> "Harold Good" <[email protected]> wrote in message
    >> news:%[email protected]...
    >>> Hi, I know little about VBA, so I've recorded a macro and pasted (see
    >>> below) it into the VBA window. It works great as a macro, but won't work
    >>> when I run it in VBA. I end up with Run-time error '1004'.
    >>>
    >>> This VBA code will work fine on a different worksheet, but not on this
    >>> "Progress" sheet. I've tried everything I can think of but can't get it
    >>> to run. The term "bottomofaddnewrows" does exist, and can be found by
    >>> the macro.
    >>>
    >>> Any help would be appreciated.
    >>>
    >>> Harold
    >>>
    >>> ============================
    >>> Sheets("Progress").Select
    >>> Cells.Find(What:="bottomofaddnewrows", After:=ActiveCell, LookIn:= _
    >>> xlValues, LookAt:=xlPart, SearchOrder:=xlByRows,
    >>> SearchDirection:= _
    >>> xlNext, MatchCase:=False, SearchFormat:=False).Activate
    >>>

    >>
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1