Clicking cells - run VBA
Right click on the Index Sheet tab (i.e., on the sheet's name (e.g.
Sheet1) and select ViewCode. Then VBE will open.
put this code in the
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
On Error GoTo NoSuchSheet:
ThisWorkbook.Worksheets(CStr(Target.Value)).Activa te
ExitSub:
On Error GoTo 0
Exit Sub
NoSuchSheet:
MsgBox "There is no such Sheet in this file!"
Resume ExitSub:
End Sub
On Jan 26, 2:00*pm, Isis wrote:
I have a Workbook full of worksheets with bank account details - the first
sheet is an Index sheet with a summary of the various accounts worksheets -
I want to select the appropriate worksheet and display it when I click (or
maybe double click) the account name on the Index sheet - can I do that ?
Thanks
|