+ Reply to Thread
Results 1 to 5 of 5

Search and move??

Hybrid View

  1. #1
    Robert M. Gary
    Guest

    Search and move??

    I would like to create a macro that reads a value from a cell, switches
    sheets, finds the cell value in the new sheet, then repositions the
    window (scrolls) so you can see the entry (so its no below the screen).

    I know I can select the value from the original cell by

    Range("C3").Select
    Selection.Copy
    Sheets("Report").Select

    but how to I actually do the find() and then bring the found value up
    to the top of the screen?

    Thanks so much in advance. I'm a Java programmer and still trying to
    figure out VB. I'm looking for something like "javadocs".

    -Robert


  2. #2
    Don Guillett
    Guest

    Re: Search and move??

    this should work
    Sub gotovalue()
    x = ActiveCelly = Sheets("sheet5").Cells.Find(x).Address
    Application.Goto Sheets("sheet5").Range(y), Scroll:=True

    End Sub

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Robert M. Gary" <[email protected]> wrote in message
    news:[email protected]...
    >I would like to create a macro that reads a value from a cell, switches
    > sheets, finds the cell value in the new sheet, then repositions the
    > window (scrolls) so you can see the entry (so its no below the screen).
    >
    > I know I can select the value from the original cell by
    >
    > Range("C3").Select
    > Selection.Copy
    > Sheets("Report").Select
    >
    > but how to I actually do the find() and then bring the found value up
    > to the top of the screen?
    >
    > Thanks so much in advance. I'm a Java programmer and still trying to
    > figure out VB. I'm looking for something like "javadocs".
    >
    > -Robert
    >




  3. #3
    Don Guillett
    Guest

    Re: Search and move??

    corrected word wrap

    Sub gotovalue()
    x = ActiveCell
    y = Sheets("sheet5").Cells.Find(x).Address
    Application.Goto Sheets("sheet5").Range(y), Scroll:=True
    End Sub


    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Don Guillett" <[email protected]> wrote in message
    news:%[email protected]...
    > this should work
    > Sub gotovalue()
    > x = ActiveCelly = Sheets("sheet5").Cells.Find(x).Address
    > Application.Goto Sheets("sheet5").Range(y), Scroll:=True
    >
    > End Sub
    >
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "Robert M. Gary" <[email protected]> wrote in message
    > news:[email protected]...
    >>I would like to create a macro that reads a value from a cell, switches
    >> sheets, finds the cell value in the new sheet, then repositions the
    >> window (scrolls) so you can see the entry (so its no below the screen).
    >>
    >> I know I can select the value from the original cell by
    >>
    >> Range("C3").Select
    >> Selection.Copy
    >> Sheets("Report").Select
    >>
    >> but how to I actually do the find() and then bring the found value up
    >> to the top of the screen?
    >>
    >> Thanks so much in advance. I'm a Java programmer and still trying to
    >> figure out VB. I'm looking for something like "javadocs".
    >>
    >> -Robert
    >>

    >
    >




  4. #4
    Robert M. Gary
    Guest

    Re: Search and move??

    Ah man you rock!! That's perfect! Thanks!!

    -Robert


  5. #5
    Don Guillett
    Guest

    Re: Search and move??

    glad it helped


    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Robert M. Gary" <[email protected]> wrote in message
    news:[email protected]...
    > Ah man you rock!! That's perfect! Thanks!!
    >
    > -Robert
    >




+ 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