LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default 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 -


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO EDIT CELLS WITHOUT DOUBLE CLICKING THE BOX Chris Price Excel Discussion (Misc queries) 2 April 22nd 23 12:11 PM
Excel - prevent someone from clicking into certain cells Silverstreak Excel Discussion (Misc queries) 1 January 21st 10 02:01 PM
Problem when clicking on cells for a formula BigGSim Excel Discussion (Misc queries) 1 February 19th 08 10:16 PM
Clicking on linked cells PT[_2_] Excel Worksheet Functions 2 November 17th 07 03:49 AM
Problem with clicking on cells Gabriel B Excel Discussion (Misc queries) 2 January 11th 06 11:50 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"