View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Move user to new worksheet with cell click

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("A1").Select

End Sub


--
Regards,
Tom Ogilvy


"Phil Hageman" wrote in message
...
Thanks, Tom, it works fine. Could we take this a step further?

User clicks cell



"Tom Ogilvy" wrote:

Assuming A1 is not already the activeCell on Sheet1

right click on the the tab for sheet1 and paste in the following code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("A1").Select
End If
End Sub

--
Tom Ogilvy


"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