+ Reply to Thread
Results 1 to 10 of 10

Excel "BeforeDoubleClick" coding advice needed

  1. #1
    Registered User
    Join Date
    11-02-2017
    Location
    CALIFORNIA
    MS-Off Ver
    10
    Posts
    5

    Excel "BeforeDoubleClick" coding advice needed

    Hello! I am new to the forum and am constructing a large multi-sheet workbook for personal use. I and am using simple macros to help with page navigation. On one sheet I want to double click on a single cell in a range of cells and have the corresponding individual macros take me to the corresponding worksheets. I know how to construct simple macros and developed simple code that takes me to a single worksheet but I would like to expand the code statement to take me to different worksheets depending on the cell I double click on. The cells I will click on are are all in one column on one sheet. Thanks in advance for your help.

    Here is what I have that works;

    Please Login or Register  to view this content.
    Steve
    Last edited by kayakfisher1; 11-02-2017 at 06:56 PM. Reason: Correcting violation of rule 3

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

    Re: Excel "BeforeDoubleClick" coding advice needed

    Welcome.

    Please take the time to read up on the forum rules.




    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: Excel "BeforeDoubleClick" coding advice needed

    Hi Steve and welcome to the forum,

    See the attached for what I think you want. Double click on any sheet name and it will take you there. Look at the VBA behind the sheets and behind the module to see the code.

    VBA Double Click GoToSheet.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    11-02-2017
    Location
    CALIFORNIA
    MS-Off Ver
    10
    Posts
    5

    Re: Excel "BeforeDoubleClick" coding advice needed

    Marvin, thanks for the code. This should do exactly what I need. I can learn a lot from you gurus.

    Steve

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

    Re: Excel "BeforeDoubleClick" coding advice needed

    I have a few versions of this.

    Give this a try.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-02-2017
    Location
    CALIFORNIA
    MS-Off Ver
    10
    Posts
    5

    Re: Excel "BeforeDoubleClick" coding advice needed

    Marvin, the code it isn't working for me so I must be missing something. The worksheet I am using to double click cell selections has the cells located in a single column in a range from B6 to B45. Those cells contain text that exactly matches the worksheet names I am trying to activate. Here is the code I included on that first sheet;

    Please Login or Register  to view this content.
    Do I need to specify the target cell range? What do you suggest I try? Thx!

    Steve

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: Excel "BeforeDoubleClick" coding advice needed

    Hey Steve,

    If your list is in B6 to B45 you need to change the line of:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    You will need to do this on the code behind each sheet.

  8. #8
    Registered User
    Join Date
    11-02-2017
    Location
    CALIFORNIA
    MS-Off Ver
    10
    Posts
    5

    Re: Excel "BeforeDoubleClick" coding advice needed

    I reduced the number of sheets in the workbook temporarily while I'm working this out but it is not yet working correctly. I thought I would post the error message I am getting. Note that "Call GoToSheet" is highlighted in blue on my screen but didn't get picked up in the attached image. Double clicking on the cells causes the code to run but it hangs up and gives this error. Also, why does this code need to be included with each sheet if it only going to be called by one sheet? Thx!

    error massage.jpg

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: Excel "BeforeDoubleClick" coding advice needed

    OK Steve,

    It's time to attach your workbook so I can see what you've done.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  10. #10
    Registered User
    Join Date
    11-02-2017
    Location
    CALIFORNIA
    MS-Off Ver
    10
    Posts
    5

    Re: Excel "BeforeDoubleClick" coding advice needed

    Hello Marvin! With your help I had great luck with my workbook and the automated features I added are working fine. It is a 40 page workbook for personal use running numerous calculations, statistics, graphs, etc. You were a big help getting me over the problem I had for a couple of days. It has been fun learning more Visual Basic. Thanks!

    Steve

+ 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] Stock advisory based on four variables; Urgent, Advice, Not needed and "-"
    By Excell_Ensie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2017, 10:12 AM
  2. [SOLVED] if formula needed to populate either "1" or "0" based on number of units in another cell
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-07-2015, 11:24 AM
  3. [SOLVED] VBA help needed to remove all "/" then replace with "-" from cell "B3"and "B5"
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 02:11 PM
  4. [SOLVED] Formula Needed to fill multiple cells with "No" when the word "No" is entered into a cell
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2013, 05:36 PM
  5. [SOLVED] Formula needed to display "Pass" or "Fail" if a column contains any values other than "yes
    By andreindy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2013, 05:49 PM
  6. Help Needed to get Filters Using "Include" and "Exclude" multiple values on one column.
    By alfykunable in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2012, 04:03 AM
  7. Advice needed: "Portable" macros?
    By durex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2005, 07:05 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