![]() |
disable cursor when double click
i have this code in sheet1
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Application.EditDirectlyInCell = True Range("A1").Activate End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) Range("A1").Select End Sub In range "A1" i have a word "dog" hence when i single click any cell on sheet1 cell a1 is selected. This is what i want. So if i want to change dog to cat i just type. But if i double click a cell a cursor appears after the "g" in dog, hence i have to use backspace to then enter "cat" I need to prevent the cursor appearing in any instance, hence allowing me to directly type over existing word Please help |
disable cursor when double click
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean) Application.EditDirectlyInCell = True Range("A1").Activate Cancel = true 'Cancel the default behaviour End Sub -- HTH... Jim Thomlinson "sunilpatel" wrote: i have this code in sheet1 Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Application.EditDirectlyInCell = True Range("A1").Activate End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) Range("A1").Select End Sub In range "A1" i have a word "dog" hence when i single click any cell on sheet1 cell a1 is selected. This is what i want. So if i want to change dog to cat i just type. But if i double click a cell a cursor appears after the "g" in dog, hence i have to use backspace to then enter "cat" I need to prevent the cursor appearing in any instance, hence allowing me to directly type over existing word Please help |
All times are GMT +1. The time now is 05:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com