Results 1 to 4 of 4

How to DeSelect a Double-clicked cell in VBA?

This is a discussion on How to DeSelect a Double-clicked cell in VBA? within the Excel Questions forums, part of the Question Forums category; I have a data entry range, and if the operator double-clicks on a cell in that range, I want to ...

  1. #1
    Board Regular SteveInAlabama's Avatar
    Join Date
    Aug 2002
    Location
    now in West Seattle, WA, USA
    Posts
    90

    Default How to DeSelect a Double-clicked cell in VBA?

    I have a data entry range, and if the operator double-clicks on a cell in that range, I want to Show a Form related to that row using the Worksheet_BeforeDoubleClick event. I have the Application.Intersect part working fine.

    But when I double-click the cell, it goes into Edit mode, with the cursor flashing in the cell, ready to edit its contents. I want to escape out of the Edit mode using VBA code. How is this done?

    Thanks in advance!

  2. #2
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling
    Posts
    66,151

    Default Re: How to DeSelect a Double-clicked cell in VBA?

    Add this to the code.
    Code:
    Cancel = True
    If posting code please use code tags.

  3. #3
    Board Regular SteveInAlabama's Avatar
    Join Date
    Aug 2002
    Location
    now in West Seattle, WA, USA
    Posts
    90

    Smile Re: How to DeSelect a Double-clicked cell in VBA?

    Perfect!!! Thank you!

  4. #4
    New Member
    Join Date
    Jan 2013
    Posts
    3

    Default Re: How to DeSelect a Double-clicked cell in VBA?

    Finally after searching everywhere for this... THANK YOU!

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com