Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cancel Edit Mode 4

Status
Not open for further replies.

oholloway

Technical User
Apr 20, 2005
15
0
0
US
I have some code that executes in the "Before DoubleClick" portion of a worksheet.After the code finishes, the cell that was clicked goes into edit mode. Is there any way to cancel that effect or make it go back into regular mode through VBA?
 
sendkeys {ESC}

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
...or Range("Whatever Range").select

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Thank you but what module does that need to be placed in? Worksheet,ThisWorkbook,etc.
 
Another option: set Cancel=True (all in worksheet's module)
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
MsgBox "DoubleClick"
Cancel = True
End Sub


combo
 
Application.EditDirectlyInCell = False

Fane Duru
 


Hi,

I notice that for nearly 3 years, you have posted and replied 11 times and have received many good tips related to your stated needs. Yet, you have responded NOT ONCE, to
[blue]
Thank Tek-Tip Contributor
for this valuable post!
[/blue].

The Stars
accomplish several important things.

First, it gives positive feedback to contributors, that their posts have been helpful.

Second, it identifies threads as containing helpful posts, so that other members can benefit.

And third, it identifies the original poster (that's YOU, BTW), as a grateful member, that not only receives, but is willing to give tokens of thanks.


Skip,
[sub]
[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top