Clicking cells - run VBA
Then i'd suggest you go with the hyperlink solution others brought up.
That's because with the code then, the sheet name isn't enough anymore
- along with the sheet (account) name you'll need to put down in the
index sheet also the workbook name and perhaps also its location
(depending how well structured your file system is).
Of course, tt can be done and perhaps it wouldn't be too much of a
hastle but the Hyperlinks might be just more elegan solution unless
you find it more laboursome.
On Jan 26, 3:10*pm, Isis wrote:
AB wrote :
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
firs
t
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 (o
r
maybe double click) the account name on the Index sheet - can I do
that ?
Thanks
Thanks AB, that was a help.
If I wanted to link to sheets in other workbooks is there an adaptation I
can make ?
Thanks again- Hide quoted text -
- Show quoted text -
|