Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Select and Run

I have a workbook with instructions, I would like to make it so that if you
press on a cell that has the topic you're looking for, then you'll be
directed to the text for that topic. How can I do that?

For example:
A1 How to bake - if I click on this cell, then I'd be directed to Sheet2!B1


Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Select and Run

I would use a double-click rather than a single click. Right-click the sheet
tab for Sheet1, for example, choose View Code, and paste in the following
code:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Select Case Target.Address(False, False)
Case "A1"
Cancel = True
Application.Goto reference:=Worksheets("Sheet2").Range("B1")
Case "A3"
Cancel = True
Application.Goto reference:=Worksheets("Sheet2").Range("B3")
' other Case statements for other cells
End Select
End Sub

If the user double-clicks on A1 or A3, they'll be taken to a range on
Sheet2. Add additioanl Case elements for the various cells.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Clara" wrote in message
...
I have a workbook with instructions, I would like to make it so that if you
press on a cell that has the topic you're looking for, then you'll be
directed to the text for that topic. How can I do that?

For example:
A1 How to bake - if I click on this cell, then I'd be directed to
Sheet2!B1


Thanks.


Reply
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
VBA: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
End Select without Select Case, Block If without End If errors Atreides Excel Programming 12 November 17th 06 05:10 PM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 5th 05 12:03 AM
Select other workbook to select data in a macro. T Tromp Excel Programming 2 September 19th 03 01:43 PM


All times are GMT +1. The time now is 04:34 AM.

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

About Us

"It's about Microsoft Excel"