Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi. Is there any way to cancel Excel edit mode using COM interfaces
from outside? I mean, can it be canceled from other application that gets pointer to Excel IDispatch? Any ideas? Thanks. On Oct 17, 7:31 pm, JE McGimpsey wrote: Note that this will disable ALL double clicks, even if the active cell's value is not "û","ü", or blank (which may be exactly what you want, but isn't obvious from your code). In article , Gord Dibben <gorddibbATshawDOTca wrote: Add the Cancel = True line as shown Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As _ Boolean) If ActiveCell = "û" Or Len(ActiveCell) = 0 Then ActiveCell.Font.Name = "Wingdings" ActiveCell.Font.Size = "14" ActiveCell.Font.ColorIndex = 50 ActiveCell = "ü" Else If ActiveCell = "ü" Then ActiveCell.Font.Name = "Wingdings" ActiveCell.Font.Size = "14" ActiveCell.Font.Color = vbRed ActiveCell = "û" End If End If Cancel = True 'add this line End Sub Gord Dibben MSExcelMVP On Wed, 17 Oct 2007 09:47:01 -0700, Adam Thwaites wrote: If you select a cell and press F2, or double click it, the cell will go into editmode. I am using the following code to insert ticks and crosses in blank cells: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If ActiveCell = "û" Or Len(ActiveCell) = 0 Then ActiveCell.Font.Name = "Wingdings" ActiveCell.Font.Size = "14" ActiveCell.Font.ColorIndex = 50 ActiveCell = "ü" Else If ActiveCell = "ü" Then ActiveCell.Font.Name = "Wingdings" ActiveCell.Font.Size = "14" ActiveCell.Font.Color = vbRed ActiveCell = "û" End If End If End Sub After this code has run the cell goes intoeditmode, and as the code runs 'BeforeDoubleClick' I can't get out ofeditmodein the code. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run procedure when exit design mode | Excel Discussion (Misc queries) | |||
Cells no longer highlighted in XL2003 edit mode? | Excel Discussion (Misc queries) | |||
I can't exit from Design mode anymore | Excel Discussion (Misc queries) | |||
What is procedure to exit formula auditing mode? | Excel Discussion (Misc queries) | |||
Combo Box goes to edit mode even if design mode is in OFF position | Excel Discussion (Misc queries) |