+ Reply to Thread
Results 1 to 5 of 5

Error moving between ranges and sheets

  1. #1
    Forum Contributor
    Join Date
    10-05-2017
    Location
    Altamonte Springs, FL
    MS-Off Ver
    Office 365
    Posts
    146

    Error moving between ranges and sheets

    Hello, I created code for when an Open event occurs, but can't control what is selected at that time. I'm getting errors. I have this:

    Please Login or Register  to view this content.
    This is an .xltm template file. If I save the template beforehand while on the "Scenarios" sheet, it will have a problem activating the last jump to the "Guide" sheet when I open it again. But, if I save previously while on the "Guide" sheet, it will have a problem right away with just selecting for the zoom in "Scenarios". It all depends on how I save the template beforehand.

    What I really want the workbook to do is open to "Guide" (with no visible cell highlighted), but when the user goes to the the "Scenarios" sheet, Range I4 is selected so that can be the first thing she has to change.

    Any suggestions? Did that make sense? I feel like .Select would just go wherever I want, but in reality may need an .Activate to get it there properly. Where am I wrong? Thank you.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,985

    Re: Error moving between ranges and sheets

    You can't select a range on a sheet that isn't active, so you do need:

    Please Login or Register  to view this content.
    near the start.
    Everyone who confuses correlation and causation ends up dead.

  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
    48,317

    Re: Error moving between ranges and sheets

    Untested but try:

    Please Login or Register  to view this content.
    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
    10-05-2017
    Location
    Altamonte Springs, FL
    MS-Off Ver
    Office 365
    Posts
    146

    Re: Error moving between ranges and sheets

    Thank you very much. That worked and exactly what I was looking for.

  5. #5
    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
    48,317

    Re: Error moving between ranges and sheets

    You're welcome. Thanks for the rep.

+ 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. Replies: 2
    Last Post: 08-11-2020, 11:26 AM
  2. Comparins two ranges on two sheets gives an error
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2016, 11:18 AM
  3. Moving date ranges into different sheets?
    By jim562594 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2013, 10:17 AM
  4. Error moving and deleting data in between sheets
    By jsantos in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-18-2011, 07:09 PM
  5. Moving around within two ranges
    By Jasrenkai in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2011, 09:36 PM
  6. data is moving both target and error sheets
    By ramserp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2009, 02:53 AM
  7. [SOLVED] Error moving sheets between workbooks
    By Keith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2006, 03:50 AM

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