+ Reply to Thread
Results 1 to 2 of 2

Is there a command in visual basic to move down one space, e.g. m.

  1. #1
    Brent
    Guest

    Is there a command in visual basic to move down one space, e.g. m.

    I am trying to set up a macro to copy an array of data with a known number of
    columns, but an unknown number of rows into a spreadsheet. I have several
    worksheets of data that are constantly being updated and would like to copy
    the data into one spreadsheet every week or so by running the macro. The
    macro recognizes "ctrl+downarrow" and scrolls to the last row of data, but if
    I hit the down arrow or "enter", the visual basic records this as selecting a
    cell, and not scrolling down one space.

    Any ideas? Thanks.

  2. #2
    Robin Hammond
    Guest

    Re: Is there a command in visual basic to move down one space, e.g. m.

    Brent,

    Assuming column 1 is filled you can use variants on this

    Dim lLastRow as Long
    lLastRow = activesheet.range("a1").end(xldown).row

    Robin Hammond
    www.enhanceddatasystems.com

    "Brent" <Brent@discussions.microsoft.com> wrote in message
    news:1CB71C1D-4C41-4553-98BF-74C925CA9018@microsoft.com...
    >I am trying to set up a macro to copy an array of data with a known number
    >of
    > columns, but an unknown number of rows into a spreadsheet. I have several
    > worksheets of data that are constantly being updated and would like to
    > copy
    > the data into one spreadsheet every week or so by running the macro. The
    > macro recognizes "ctrl+downarrow" and scrolls to the last row of data, but
    > if
    > I hit the down arrow or "enter", the visual basic records this as
    > selecting a
    > cell, and not scrolling down one space.
    >
    > Any ideas? Thanks.




+ 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