View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Move user to new worksheet with cell click

right click sheet tabview codecopy/paste thisSAVE
You might want to restrict to a certain area of the worksheet such as this
as 1st line.
if target.row<3 or target.column<1 then exit sub

to automatically goto the same cell on sheet 2
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.Goto Sheets("sheet2").Range(Target.Address)
End Sub

to goto cell a1 on sheet 2 if cell a1 on sheet 1 clicked.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then _
Application.Goto Sheets("sheet2").Range("a1")
End Sub
--
Don Guillett
SalesAid Software

"Phil Hageman" wrote in message
...
When a user clicks on cell A1 in Sheet1, they are moved to Sheet2, cell

A1.
What would the code be?

Thanks, Phil