View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Eric[_14_] Eric[_14_] is offline
external usenet poster
 
Posts: 24
Default is it possible to jump to the souce of link in sheet with mosue click??

John

I have some code you can use below (I assume you are familiar with Visual Basic). It uses the "Precedent" property of cells, which returns the range of all the precedent cells. The unfortunate part of what I wrote is that it uses the "SheetSelectionChange" event, so it will always select the cell's precedents when you click on any cell (ie you can't actually get into the cell any more). I think you would want to come up with something more sophisticated - maybe make a button like the "Paste Format" button that lets you select it, and then the code is activated for the next cell you select. Also, it only works with cells in the active sheet. To get to other sheets or workbooks, you'd have to fiddle with it to get that information out of the precedent range. I hope this helps you along though!

Eri

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range

On Error Resume Next ' so that nothing happens if there are no precedent

ActiveCell.DirectPrecedents.Selec

End Su