+ Reply to Thread
Results 1 to 6 of 6

Scroll Macro

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Scroll Macro

    I usually find myself deleting any scrolling code from the macro recorder, but now I want to have some scroll code. Does anyone know the simplest code to scroll to the top of the page? I could copy from the macro recorder, but it seems to be a relative reference rather an absolute one. But I'm not totally sure.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Scroll Macro

    The Control +Home key will take you to cell A1. Is this what you are looking to do?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Scroll Macro

    Try:

    Please Login or Register  to view this content.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Scroll Macro

    I didn't think about it, but simply selecting a cell on top would probably solve my scrolling issue. What would be the benefit of using

    Please Login or Register  to view this content.
    As opposed to

    Please Login or Register  to view this content.
    ?

  5. #5
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Scroll Macro

    I didn't think about it, but simply selecting a cell on top would probably solve my scrolling issue. What would be the benefit of using

    Please Login or Register  to view this content.
    As opposed to

    Please Login or Register  to view this content.
    ?

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Scroll Macro

    I'm sure I have read or experienced issues with a .select not necessarily scrolling to the target cell.

    However, if for example, Sheet1 is selected:

    This will fail ... (because you need to select the sheet first)

    Please Login or Register  to view this content.

    But this will work:

    Please Login or Register  to view this content.

    Regards, TMS

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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