+ Reply to Thread
Results 1 to 8 of 8

making a cell in a worksheet (when clicked on) move you to a different worksheet

  1. #1
    Registered User
    Join Date
    09-04-2013
    Location
    Mays Landing, NJ
    MS-Off Ver
    Excel 2007
    Posts
    7

    making a cell in a worksheet (when clicked on) move you to a different worksheet

    Hello,
    I'm trying to make a cell in a worksheet (when clicked on) move you to a different worksheet.
    I'm not a super advanced excel user,.. but I'm thinking this type of function would be a Macro.
    (I've never done a maco before),.. but I assume to do this one function wouldn't be too difficult.
    Any advice would be appreciated.
    Thanks,- gwa

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: making a cell in a worksheet (when clicked on) move you to a different worksheet

    There are two Macros required.

    One sheet specific

    Right Click on the name "Sheet Two" at the bottom of excel and select "View Code"


    The other is a normal Macro.

    Click on developer, Macro, "SheetChange" and the edit.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: making a cell in a worksheet (when clicked on) move you to a different worksheet

    I think one macro is enough (put code into Sheet1 or Sheet2 module - macro requires to double click the cell)
    Please Login or Register  to view this content.
    or you can create a hyperlink to another worksheet.

  4. #4
    Registered User
    Join Date
    09-04-2013
    Location
    Mays Landing, NJ
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: making a cell in a worksheet (when clicked on) move you to a different worksheet

    I tried the two Macro approach ( one : Right Click on the name "Sheet Two" at the bottom of excel and select "View Code") and I pasted the code you provided,.. then I added the normal Macro,.. Clicked on developer, Macro, "changesheet" and the edit and pasted the code for that too.
    I changed the cell to $A$1 so that it would work for that position,... it worked fine,

    .... but when I attempted to do the same for another cell,..[i.e. $A$2 ]... (to be able to Dbl Click and go to a totally different sheet ,... other than the one that Dbl Clicking on Cell $A$1 would divert to,... it doesn't work,.... what I'm trying to be able to do is Dbl click cell $A$1 and goto one specific sheet and also be able to Dbl Click onto cell $A$2 and go to a different unique sheet,... and so on and so forth,... up to cell $A$36 ... and have 36 unique sheets to be diverted to when Dbl clicking.

    I appreciate the help given,... it seems to be the right track

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: making a cell in a worksheet (when clicked on) move you to a different worksheet

    Ok

    This is totally the wrong track.

    You need my sheet navigation Macros if you have 36 sheets that you need to navigate.

    Firstly have you tried right clicking on the arrows at the bottom left of excel? Try That First.

    Secondly I have a userform that lists all your worksheets and all you do is click on the name to go there.
    I will attach it in a worksheet for you to see.

    Finally I have written a suite of programs for sheet navigation and sheet management.

    Mems Sheet Management Programs:

    Contents. Creates an index sheet that lists all the sheets in your workbook.

    Goto: If on any sheet other than the index it takes you to the index sheet
    If on the index sheet it takes you to the sheet named on the active row.

    SortList: Sorts all the sheets in the workbook to match the list in the index sheet.
    So if you sort the index alphabetically and run sortlist then your workbook will be sorted alphabetically.

    Isn't that a better solution?
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: making a cell in a worksheet (when clicked on) move you to a different worksheet

    Sbarro79

    Hi

    I think Sheet Specific sheet macros are sheet specific.
    What would you expect the following code to do?

    Now Try it.

    Please Login or Register  to view this content.

    Sheet 3 is indeed displayed but that is all.

    the 5 is entered into A1 in sheet 2.

    The macro can do nothing in sheet 3 to my knowledge.

    Thats why I use a second non sheet specific macro.

    It cost me two hours of frustration to work this out a couple on months ago.

  7. #7
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: making a cell in a worksheet (when clicked on) move you to a different worksheet

    Hi mehmetcik

    Well, in the original post written by gwa there is only request for macro that move to different worksheet when cell is clicked, but there is nothing about doing something in different worksheet by the macro, so I think at that time my macro was OK (not my fault, that gwa didn't disclose, what exactly he is trying to achieve)
    And about your code you asked me to try: just change the line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and see, where the 5 appears (I had 5 in cell A1 in Sheet3)

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: making a cell in a worksheet (when clicked on) move you to a different worksheet

    Well Done

    Thank you for that.

    Activesheet.Range("A1").Value = 5 does indeed work differently to Range("A1").Value = 5 in this scenario.

+ 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. [SOLVED] How do I make values in a cell in one worksheet move to another worksheet
    By icevinson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2013, 06:46 PM
  2. [SOLVED] Clicked checkbox shows worksheet name in another worksheet
    By ashen786 in forum Excel General
    Replies: 1
    Last Post: 09-13-2012, 10:45 AM
  3. Replies: 4
    Last Post: 09-11-2012, 12:47 PM
  4. Replies: 5
    Last Post: 05-27-2012, 12:18 PM
  5. Replies: 1
    Last Post: 02-14-2012, 07:00 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