+ Reply to Thread
Results 1 to 7 of 7

Move view to a certain range of cells

  1. #1
    Registered User
    Join Date
    04-30-2015
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    50

    Move view to a certain range of cells

    Hi!
    I'm trying to get this button working right. Basically, when I click the button I want to have the view of the sheet moved to the range in the macro (Z7:AI7)
    and it works great the first time its clicked!
    but every time afterwards, the view doesn't move to that range, it just moves the selected cell to AA6

    Please Login or Register  to view this content.
    That's the code im using

  2. #2
    Registered User
    Join Date
    09-05-2014
    Location
    Montreal
    MS-Off Ver
    2007
    Posts
    22

    Re: Move view to a certain range of cells

    I don't know why you want to select Range("AA6") after. Could this work?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-30-2015
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    50

    Re: Move view to a certain range of cells

    Quote Originally Posted by ggs22 View Post
    I don't know why you want to select Range("AA6") after. Could this work?
    AA6 is where the data entry would begin, and I just tried that and the same thing happened,
    It's as if activewindow.zoom only works one time

  4. #4
    Registered User
    Join Date
    09-05-2014
    Location
    Montreal
    MS-Off Ver
    2007
    Posts
    22

    Re: Move view to a certain range of cells

    Just to make it clear, activewindow.zoom=true adjust the zoom to the current selection (i.e. if a single cell is selected, zoom will increase to 400%) it doesn't move the focus. Normally, range.activate and range.select automatically move the view to that range. So that would be why Range("AA6").select moved the view back to that cell.

    If I am not helping, please give more details about the expected behavior of the code.

  5. #5
    Registered User
    Join Date
    04-30-2015
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    50

    Re: Move view to a certain range of cells

    After the first time pressing the button:
    firs press.png
    After the second time pressing the button:
    second press.png

    It works the first time, but after the zoom is changed that first time it no longer works
    what I'm wanting to know is how I can make it work every time the button is pressed

  6. #6
    Registered User
    Join Date
    09-05-2014
    Location
    Montreal
    MS-Off Ver
    2007
    Posts
    22

    Re: Move view to a certain range of cells

    Ok now I understand, try this:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-30-2015
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    50

    Re: Move view to a certain range of cells

    Worked great, though 20 made it look really glitchy (though it isn't) so i bumped it up to 80 (closer to the final result)
    Thanks!
    Solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Move Range Of Cells If Cell Contains Specific Value
    By scarlettw123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-07-2015, 11:06 PM
  2. [SOLVED] Move cells so that selected range is right aligned
    By Pedsdude in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-02-2014, 03:39 PM
  3. If offset range is not blank move 3 cells right
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2014, 06:15 AM
  4. Replies: 8
    Last Post: 04-12-2013, 10:54 AM
  5. Move a range of cells to another sheet
    By bowhunt24 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-09-2011, 07:32 PM
  6. Move cell/range of cells
    By maybelle in forum Excel General
    Replies: 5
    Last Post: 08-13-2009, 10:51 AM
  7. Select range of cells and move
    By Dan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2005, 07:06 PM

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