+ Reply to Thread
Results 1 to 4 of 4

Applying a doubleclick macro to a cell with data validation

  1. #1
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    10,183

    Applying a doubleclick macro to a cell with data validation

    Can you help me understand what I'm missing here? In D6 I have data validation with numbers. When I double click on D6 I want the word "Works" added to cell H6. All this works fine with the macro below.

    As soon as I password protect the sheet I can't get the double click macro to run. When double clicking D6 I just get the spinning wheel and no action. If I hit escape the spinning wheel stops, but still no action.

    If I remove the data validation from D6 the code runs fine even protected. I feel I've missed something obvious, but I can't see it.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    HTH
    Regards, Jeff

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,775

    Re: Applying a doubleclick macro to a cell with data validation

    It's the issue with how Data Validation in-cell dropdown works on protected sheet.
    When sheet is protected, as soon as you select the cell holding in-cell dropdown, dropdown will display and interrupts the code.

    Basically it stops code from proceeding until data validation dropdown is confirmed / cancelled.
    And when you confirm the action... that supersedes BeforeDoubleClick() event, and that event is no longer triggered.

    You can get around this by allowing DrawingObjects.

    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    10,183

    Re: Applying a doubleclick macro to a cell with data validation

    Thank you so much CK76. This is great.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,775

    Re: Applying a doubleclick macro to a cell with data validation

    You are welcome and thanks for the rep

+ 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] Applying filtering on data validation selection
    By Franki81 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-05-2016, 07:09 AM
  2. [SOLVED] Applying Data Validation to Allow Only Formulas
    By loverfellow in forum Excel General
    Replies: 5
    Last Post: 12-03-2015, 12:32 AM
  3. vba code for copying data to cell and applying macro (drop down list)
    By Tamjeed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2014, 10:57 AM
  4. [SOLVED] Applying custom data validation to multiple columns
    By D_N_L in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-21-2014, 05:11 AM
  5. [SOLVED] excel 2010, checkbox macro to change text upon doubleclick of cell?
    By fredderf81 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2013, 02:35 AM
  6. Replies: 4
    Last Post: 06-04-2013, 11:01 AM
  7. Applying Conditional Formatting to Data Validation
    By kcstewart in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-28-2007, 06:46 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