close

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 quot;Pquot; to appear in A1 and so on and so on down to say B3000. Can this
be done?

Cheers

SPL

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
If Union(Range(quot;$B:$Equot;), Target).Address = Range(quot;$B:$Equot;).Address Then
ActiveCell.Offset(0, -1).Range(quot;A1quot;).Select
ActiveCell.FormulaR1C1 = quot;Pquot;
ActiveCell.Select
With Selection
.HorizontalAlignment = xlCenter
End With
ActiveCell.Offset(0, 1).Range(quot;A11quot;).Select
Cancel = True
End If
End SubTry This!!!--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: www.excelforum.com/member.php...oamp;userid=31708
View this thread: www.excelforum.com/showthread...hreadid=520988

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()