ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add Hyperlink to newly added worksheet? (https://www.excelbanter.com/excel-programming/274213-add-hyperlink-newly-added-worksheet.html)

onliner

Add Hyperlink to newly added worksheet?
 
Using Excel 97; Win2K

I'm looking for a way via VBA to add a hyperlink to my "summary" worksheet
each time I add a newly named worksheet which gets its name from a cell
value.
In other words, if I have in D6 thru D9,
MySheet1
MySheet2
MySheet3
MySheet4
and then add MySheet to cell D10, have some code that adds a hyperlink in
Cell D10 that takes me to MySheet5.
Is this possible?
Thanks.




Ron de Bruin

Add Hyperlink to newly added worksheet?
 
Check out
http://www.mvps.org/dmcritchie/excel/buildtoc.htm
I don't know if this will add it automatic??

Don't you like the right click on the arrows on the left off the sheet tabs.

Or

Sub SheetList_CP()
'Chip Pearson, 2002-10-29, misc.
On Error Resume Next
Application.CommandBars("Workbook Tabs").Controls("More Sheets...").Execute
Application.CommandBars("Workbook Tabs").ShowPopup
On Error GoTo 0
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"onliner" wrote in message news:Yv6_a.55874$Ne.32052@fed1read03...
Using Excel 97; Win2K

I'm looking for a way via VBA to add a hyperlink to my "summary" worksheet
each time I add a newly named worksheet which gets its name from a cell
value.
In other words, if I have in D6 thru D9,
MySheet1
MySheet2
MySheet3
MySheet4
and then add MySheet to cell D10, have some code that adds a hyperlink in
Cell D10 that takes me to MySheet5.
Is this possible?
Thanks.






keepITcool

Add Hyperlink to newly added worksheet?
 
very elegant! i'll keep that.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Ron de Bruin" wrote:

Sub SheetList_CP()
'Chip Pearson, 2002-10-29, misc.
On Error Resume Next
Application.CommandBars("Workbook Tabs").Controls("More
Sheets...").Execute Application.CommandBars("Workbook
Tabs").ShowPopup On Error GoTo 0
End Sub



onliner

Add Hyperlink to newly added worksheet?
 
Thanks Ron, Thanks KeepITcool,
I will give these ideas a try.








"keepitcool" wrote in message
...
OnLiner..

you may have to adjust positioning but try following:

Sub AddIndex()
Dim i%
With Worksheets(1)
For i = 2 To Worksheets.Count
.Hyperlinks.Add _
Anchor:=.Cells(3 + i, 2), _
Address:="", _
SubAddress:=Worksheets(i).Name & "!A1", _
TextToDisplay:=Worksheets(i).Name
Next
End With
End Sub



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"onliner" wrote:

Using Excel 97; Win2K

I'm looking for a way via VBA to add a hyperlink to my "summary"
worksheet each time I add a newly named worksheet which gets its name
from a cell value.
In other words, if I have in D6 thru D9,
MySheet1
MySheet2
MySheet3
MySheet4
and then add MySheet to cell D10, have some code that adds a hyperlink
in Cell D10 that takes me to MySheet5.
Is this possible?
Thanks.









All times are GMT +1. The time now is 02:22 AM.

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