Cell redirect to sheet!


Posted by Pedro Pereira on March 11, 2000 5:33 PM

Is that possible to be redirect to other sheet when
you click on a cell?



Posted by Celia on March 12, 2000 5:13 PM


Pedro
If you mean that when you click on a specific cell (let’s say cell A1) in a specific sheet (let’s say Sheet1) you want to activate a different sheet, then the following is one way of doing it.

Put the following into the Sheet1 code module (not into a normal module). When you double click on cell A1 of Sheet1, Sheet2 will be activated.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = "$A$1" Then
Worksheets("Sheet2").Select
End If
End Sub

Celia