ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   alternative to hyperlinks (https://www.excelbanter.com/excel-programming/298042-alternative-hyperlinks.html)

No Name

alternative to hyperlinks
 

-----Original Message-----
I have a workbook with 30 plus tabs. is there a way to

have a table of contents with each tab name where the user
can click on a name and be taken to the sheet.

.
Hyperlinks work great for that application. You can

insert them with code. This explanation is from the Excel
HELP. In HELP type HYPERTEXT check out the add method:
Adds a hyperink to the specified range or shape. Returns
a Hyperlink object.

Syntax

object.Add(Anchor, Address, SubAddress, ScreenTip,
TextToDisplay)

object Required. An expression that returns a Hyperlinks
object.

Anchor Required Object. The anchor for the hyperlink.
Can be either a Range or Shape object.

Address Required String. The address of the hyperlink.

SubAddress Optional Variant. The subaddress of the
hyperlink.

ScreenTip Optional Variant. The screen tip to be
displayed when the mouse pointer is paused over the
hyperlink.

TextToDisplay Optional Variant. The text to be displayed
for the hyperlink.

*****
working in the same workbook leave address blank but fill
in detail for subaddress. I used this in a loop and it
does the trick
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:= "SHEETNAME!A1", TextToDisplay:="ANY TEXT"

Regards,
Mike


All times are GMT +1. The time now is 03:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com