Stop Cell Edit when DoubleClick
From: David McRitchie (dmcritchie_at_msn.com)
Date: 05/10/04
- Next message: Todd Huttenstine: "Re: Syntax Problem with formula code"
- Previous message: JWolf: "Re: Syntax Problem with formula code"
- Next in thread: Greg Koppel: "Re: Stop Cell Edit when DoubleClick"
- Reply: Greg Koppel: "Re: Stop Cell Edit when DoubleClick"
- Reply: Norman Jones: "Re: Stop Cell Edit when DoubleClick"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 12:06:45 -0400
When I double-click on a cell it puts the cell into
"Edit mode". How do I turn this off. True whether
there is a double-click Event macro or not. My concern
is when a macro is involved, having the cell in Edit mode
messes up things including working in the VBE while
in cell edit.
Shows up more obviously if cell content is like
'AAA because then you will see the single quote
within the cell and the cursor after the last character.
Tools, Options, Edit, Edit Directly in a Cell
is invoked and it will stay that way.
Just want the macro to not leave it in Edit mode.
Test without and with a macro:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
MsgBox "do nothing"
End Sub
The following will circumvent, but there must be a better way
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
MsgBox "do nothing"
Application.SendKeys "{Down}"
Application.SendKeys "{up}"
End Sub
And if "edit mode" is not the correct terminology
please correct. Might be obvious from the solution though.
--- TIA, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
- Next message: Todd Huttenstine: "Re: Syntax Problem with formula code"
- Previous message: JWolf: "Re: Syntax Problem with formula code"
- Next in thread: Greg Koppel: "Re: Stop Cell Edit when DoubleClick"
- Reply: Greg Koppel: "Re: Stop Cell Edit when DoubleClick"
- Reply: Norman Jones: "Re: Stop Cell Edit when DoubleClick"
- Messages sorted by: [ date ] [ thread ]