+ Reply to Thread
Results 1 to 8 of 8

Command Button control of Sheet selection

  1. #1
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Command Button control of Sheet selection

    I would like to know how to configure buttons:

    In tab Sheet1 there is Commandbuttons named "Sheet2" & "Sheet3". If i press "Sheet2" then i will be directed to sheet2 tab, same as "Sheet3". In tab Sheet2 & Sheet3 there is commandbutton "Sheet1", if i press the button then i will be directed to default tab which is sheet1. Please show me how to do it. Thanks

    P.S. : I would also like to make the Tabs Sheet2 & Sheet3 to be hidden if its possible

    Update: I've played around from other posts here and i've come up with this simple and can be functional for me someday thanks for people who helped.. try2.xls was my output
    Attached Files Attached Files
    Last edited by NBVC; 04-13-2009 at 07:44 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help from the Experts Please

    Right click the SHEET2 button and select VIEW CODE.

    In the window that pops up, add this line of code:
    Please Login or Register  to view this content.
    Press Alt-Q to close the editor.

    Repeat the process for the other tabs, edit that code string to point to the correct sheet each time.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Help from the Experts Please

    thanks i will try

  4. #4
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Help from the Experts Please

    thanks it worked! another thing.. how to make a user form pop-up with a single button?

  5. #5
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Help from the Experts Please

    Quote Originally Posted by JBeaucaire View Post
    Right click the SHEET2 button and select VIEW CODE.

    In the window that pops up, add this line of code:
    Please Login or Register  to view this content.
    Press Alt-Q to close the editor.

    Repeat the process for the other tabs, edit that code string to point to the correct sheet each time.
    Oops, sad part is it wont work if you hide the tabs sheet2 & sheet3

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Help from the Experts Please

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Help from the Experts Please

    Quote Originally Posted by royUK View Post
    Your post does not comply with Rule 1 of our Forum RULES.[/B]
    Done My Friend

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: [Solved]Command Button control of Sheet selection

    To be able to hide the sheets and only show the current one, use a syntax like so:

    Please Login or Register  to view this content.

+ 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