+ Reply to Thread
Results 1 to 4 of 4

Assigning a macro to a forms button (help)

  1. #1
    JazzBlues
    Guest

    Assigning a macro to a forms button (help)

    I would like to assign a macro to a forms button that, when clicked,
    it will take me to a specific cell on a sheet called Invoices. I would
    however like the cell that to which it takes me to be positioned in
    the top left position on the sheet when I get there. If it helps I
    have named each of the cells that i want the buttons to take me to.
    the first button should take me to the named range "week1" and so on.
    Any help with this would be appreciated. I know its a simple thing but
    I cant get my head around this for some reason.

    TIA
    Dave

  2. #2
    Tom Ogilvy
    Guest

    Re: Assigning a macro to a forms button (help)

    In the macro assigned to the button:

    Application.GoTo Destination:=Range("Week1"),Scroll:=True

    Such code should be in a general module, not a sheet or the ThisWorkbook
    module.
    --
    Regards,
    Tom Ogilvy



    "JazzBlues" <[email protected]> wrote in message
    news:[email protected]...
    > I would like to assign a macro to a forms button that, when clicked,
    > it will take me to a specific cell on a sheet called Invoices. I would
    > however like the cell that to which it takes me to be positioned in
    > the top left position on the sheet when I get there. If it helps I
    > have named each of the cells that i want the buttons to take me to.
    > the first button should take me to the named range "week1" and so on.
    > Any help with this would be appreciated. I know its a simple thing but
    > I cant get my head around this for some reason.
    >
    > TIA
    > Dave




  3. #3
    Ron de Bruin
    Guest

    Re: Assigning a macro to a forms button (help)

    Use a macro with this line

    Application.Goto Sheets("Invoices").Range("G20"), True


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "JazzBlues" <[email protected]> wrote in message news:[email protected]...
    >I would like to assign a macro to a forms button that, when clicked,
    > it will take me to a specific cell on a sheet called Invoices. I would
    > however like the cell that to which it takes me to be positioned in
    > the top left position on the sheet when I get there. If it helps I
    > have named each of the cells that i want the buttons to take me to.
    > the first button should take me to the named range "week1" and so on.
    > Any help with this would be appreciated. I know its a simple thing but
    > I cant get my head around this for some reason.
    >
    > TIA
    > Dave




  4. #4
    JazzBlues
    Guest

    Re: Assigning a macro to a forms button (help)

    Thanks Ron That worked like a charm
    Dave


    On Sun, 23 Oct 2005 23:32:19 +0200, "Ron de Bruin"
    <[email protected]> wrote:

    >Use a macro with this line
    >
    >Application.Goto Sheets("Invoices").Range("G20"), True



+ 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