+ Reply to Thread
Results 1 to 5 of 5

Double click not working

  1. #1
    Registered User
    Join Date
    03-08-2022
    Location
    USA
    MS-Off Ver
    MS 365 Subscription
    Posts
    15

    Double click not working

    Cannot figure out why code is not working.
    Code is supposed to:
    1. User double clicks a cell in table "ERL" column "Form ID:"
    2. The cell value the user double clicked is copied to sheet "Emergent Response" Cell "D4"
    3. Sheet "Emergent Response" Cell "D4" is selected.



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

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Double click not working

    The ListColumn.Index is the position of that column within the table, not the column number on the worksheet. Try this instead:

    Please Login or Register  to view this content.
    Rory

  3. #3
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Double click not working

    Please Login or Register  to view this content.
    says the SHEET column, while
    Please Login or Register  to view this content.
    says the TABLE column. That is, 4<>1, so the condition is not met.
    Try:
    Please Login or Register  to view this content.
    Artik

    ..::Edit:
    Too late
    ::..

  4. #4
    Registered User
    Join Date
    03-08-2022
    Location
    USA
    MS-Off Ver
    MS 365 Subscription
    Posts
    15

    Re: Double click not working

    Thank you for the reply.
    Question
    With the line
    Please Login or Register  to view this content.
    Why instead of ??
    wsER.Select
    wsER.Range("D4").Select

  5. #5
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Double click not working

    Application.Goto wsER.Range("D4"), True selects the cell and scrolls the sheet so that it is in the upper left corner of the window.
    If you use "your" Select, the cell will be selected, but the screen will not scroll to show that cell. As a test of both solutions, select the AZ100 cell in the "Emergent Response" sheet and run both versions in sequence. You will notice the differences.
    If you want the A1 cell to be visible in the "Emergent Response" sheet after the macro, add two lines of code after Application.Goto or after wsER.Select
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Artik

+ 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] Double click on cell to run macro not working
    By thadacto in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-14-2017, 04:20 PM
  2. Double Click and Paste stopped working
    By cspearsall in forum Excel General
    Replies: 1
    Last Post: 02-25-2016, 02:47 PM
  3. Double Click and Paste stopped working
    By cspearsall in forum Excel General
    Replies: 1
    Last Post: 02-25-2016, 01:06 PM
  4. macro not working with before double click.
    By vlady in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2015, 03:53 AM
  5. [SOLVED] Double Click Cell to go to Source not working
    By john60 in forum Excel General
    Replies: 5
    Last Post: 11-29-2012, 07:00 AM
  6. Double Click not working properly
    By MCertik in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2012, 02:32 PM
  7. Double Click not working
    By tomberlins in forum Excel General
    Replies: 4
    Last Post: 10-16-2009, 02:56 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