+ Reply to Thread
Results 1 to 5 of 5

General Navigation Best Practice Question: Application.GoTo vs. Range.Select

  1. #1
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    General Navigation Best Practice Question: Application.GoTo vs. Range.Select

    Assume a command button is used to call a sub which navigates to a range. Assume the target range is FlexHome.

    Is there any reason I should not be using
    Please Login or Register  to view this content.
    in place of calling
    Please Login or Register  to view this content.
    through which
    Please Login or Register  to view this content.
    is run?

    Also, is there any reason that
    Please Login or Register  to view this content.
    should be placed in a module and called versus placing the code directly at the worksheet level?

    Many thanks!

    ~AS
    Last edited by AlvaroSiza; 09-09-2011 at 09:32 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: General Navigation Best Practice Question: Application.GoTo vs. Range.Select

    I would use Application.GoTo

    Also, is there any reason that
    Please Login or Register  to view this content.
    should be placed in a module and called versus placing the code directly at the worksheet level?
    I don't understand the question.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: General Navigation Best Practice Question: Application.GoTo vs. Range.Select

    Quote Originally Posted by shg View Post
    I don't understand the question.
    Thanks Shg from one Texan to another. I'm green as grass and apologize if this is elementary.

    I guess I'm just verifying that the code should be in the worksheet (Right-Click Command Button >> View Code >> Code Location) like
    Please Login or Register  to view this content.
    versus

    Please Login or Register  to view this content.
    Where ToFlexHome equals:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: General Navigation Best Practice Question: Application.GoTo vs. Range.Select

    There are good reasons to parse code between class modules and standard modules according to the nature of functionality they provide, but this doesn't fall under any of them.

    If you instead had

    Please Login or Register  to view this content.
    ... then the latter might reasonably go in a code module because it is non-specific to any worksheet or event, but invoking a procedure to replace a single simple line of code is ... not good.

  5. #5
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: General Navigation Best Practice Question: Application.GoTo vs. Range.Select

    Great. Thanks so much for your time and thoughts.

    -AS

+ 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