+ Reply to Thread
Results 1 to 10 of 10

problems with doublclick

  1. #1
    Registered User
    Join Date
    05-30-2019
    Location
    Reidsville, NC
    MS-Off Ver
    365
    Posts
    11

    problems with doublclick

    I'm trying to run some code when a user doubleclicks on a worksheet cell but the BeforeDoubleClick sub never fires. Is there another way to capture doubleclicks?

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,509

    Re: problems with doublclick

    How do you know it never fires? Have you tried putting a pause break in the code and trying it?

    Could you attach the file? Desensitize it if necessary.

    BSB

  3. #3
    Registered User
    Join Date
    05-30-2019
    Location
    Reidsville, NC
    MS-Off Ver
    365
    Posts
    11

    Re: problems with doublclick

    Never mind. I was putting the code in the wrong sheet. Dummy me!

  4. #4
    Registered User
    Join Date
    05-30-2019
    Location
    Reidsville, NC
    MS-Off Ver
    365
    Posts
    11

    Re: problems with doublclick

    But I do have another issue. When I doubleclick on a cell, it opens a form loaded with the data from the row. The issue is that the cell is now in edit mode and the form can't be edited unless I click on the worksheet to take the cell out of edit mode. Is there a way to prevent the cells from being edited? I only want data edited within the form.

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,509

    Re: problems with doublclick

    Try adding the below just before the line that opens the form:
    Please Login or Register  to view this content.
    BSB

  6. #6
    Registered User
    Join Date
    05-30-2019
    Location
    Reidsville, NC
    MS-Off Ver
    365
    Posts
    11

    Re: problems with doublclick

    Unfortunately, that doesn't work. Any other suggestions?

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: problems with doublclick

    This works fine for me.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  8. #8
    Registered User
    Join Date
    05-30-2019
    Location
    Reidsville, NC
    MS-Off Ver
    365
    Posts
    11

    Re: problems with doublclick

    That is working now. Had the code in the wrong place. Is there a way to lock the sheet so that the data is only editable using the form? I don't want the user prompted for a password (which I think protecting the sheet does).

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: problems with doublclick

    You only need to unprotect and protect when writing back to worksheet.

    Please Login or Register  to view this content.

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,509

    Re: problems with doublclick

    Quote Originally Posted by rutledj View Post
    That is working now. Had the code in the wrong place.

    Well done to Bakerman2 for stepping in. Much appreciated.

+ 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. Problems with downloaded .csv - matrix sum problems
    By mloiten in forum Excel General
    Replies: 2
    Last Post: 11-02-2018, 12:40 AM
  2. [SOLVED] Problems with sorting andf Pivot Table problems
    By Saturn in forum Excel General
    Replies: 4
    Last Post: 10-07-2012, 07:47 AM
  3. Replies: 0
    Last Post: 12-25-2011, 04:30 PM
  4. 2 problems i need help with...
    By Dan Mackman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2007, 05:50 PM
  5. [SOLVED] More Problems with CBO's
    By mtm4300 via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-17-2006, 09:40 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