Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
doubleclick
Hi All,
How can I use double-click to enter a letter in a cell. For example, in B1:E1 I have an address, when I double-click on B1 I would like a "P" to appear in A1 and so on and so on down to say B3000. Can this be done? Cheers SPL |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
doubleclick
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) If Union(Range("$B:$E"), Target).Address = Range("$B:$E").Address Then ActiveCell.Offset(0, -1).Range("A1").Select ActiveCell.FormulaR1C1 = "P" ActiveCell.Select With Selection .HorizontalAlignment = xlCenter End With ActiveCell.Offset(0, 1).Range("A1:D1").Select Cancel = True End If End Sub Try This!!! -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=520988 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When I doubleclick in Excel, page jumps down/up. | Excel Discussion (Misc queries) | |||
Opening files in Excel with mouse wheel set for doubleclick | Excel Discussion (Misc queries) |