Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Excel Hyperlinks to refer to a Subroutine rather than a Cell
Hello Again -
I have found that given a list of worksheet names I can create hyperlinks to those worksheets (let's say specifically Cell P2) using the following code: ws.Activate For row = tRow To bRow ws.Cells(row, col).Select With Selection t2D = Selection.Value ' Note that the Cell value is the WS Name subA = "'" & t2D & "'!P2" .ClearContents ws.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=subA, TextToDisplay:=t2D End With Next I can also scroll a worksheet to exactly the right cell using: Sub scroll2Column(wsName) Sheets(wsName).Activate ActiveWindow.ScrollColumn = 16 ActiveSheet.Range("P2").Select End Sub I would like to combine these two concpets and create a hyperlink which doesn't just refer to the cell but to the subroutine which brings the user to the cell and then conviently scrolls the worksheet as well. Despite many attempts at this, I have not gotten that to work. Does anyone know how this might be done? Thanks in advance, Chris Tauss ) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Call a subroutine using variable subroutine name | Excel Discussion (Misc queries) | |||
Help! Can't refer to a subroutine on a worksheet | Excel Programming | |||
sql that will refer to a cell in excel | Excel Programming | |||
Excel Hyperlinks- cell content v. hyperlinks | Excel Discussion (Misc queries) | |||
How do I refer to the tab name in a cell formula in Excel? | Excel Discussion (Misc queries) |