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 |
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 |
All times are GMT +1. The time now is 03:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com