View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Change from Column Selection to Cell Selection

Hi LiPun,

Try something like:

'=============
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Count 1 Then Exit Sub

If Not Intersect(Target, Me.Range("A50")) Is Nothing Then
On Error GoTo XIT
Application.EnableEvents = False
If Target.Value = 1 Then
Me.Range("C2").Select
Application.SendKeys "{F2}"
End If
End If
XIT:
Application.EnableEvents = True
End Sub
'<<=============



---
Regards,
Norman



"Lil Pun" wrote in
message ...

Right now I have code setup so if a 1 is entered into a cell in Column A
the active cell is made then made Cell C2. I want to change it so that
it is a specific cell (A50) instead of the entire column.

Here is the code that does it now:


If avoidloop And Trim(Target) < "" Then
If Target = "1" Then
Range("C2").Select
Application.SendKeys "{F2}"
Else



--
Lil Pun
------------------------------------------------------------------------
Lil Pun's Profile:
http://www.excelforum.com/member.php...o&userid=33840
View this thread: http://www.excelforum.com/showthread...hreadid=552527