Thread: Select and Run
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
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.