#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default hyperlink

hello
i have a macro that give a list of all sheett name in a workbook
how can i add a clickable link to the code so every time i click on
sheet name it jump to it
moshe
my code
Sub sheetret()
Application.ScreenUpdating = False
Dim shtsNumber, sh As Integer
shtsNumber = Sheets.Count
ActiveCell.Select
ActiveCell.FormulaR1C1 = "sheet list"
ActiveCell.Font.ColorIndex = 3
ActiveCell.Offset(1, 0).Activate
For sh = 1 To shtsNumber
ActiveCell.Offset(sh - 1, 0).Value = Sheets(sh).Name
Next sh
With selection.Font
.Italic = True
.Bold = True
End With
boldera
SortWorksheets
fifts
Application.ScreenUpdating = True
End Su

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default hyperlink

Check out this previous thread in Google for an alternative approach to
exactly the same problem as you describe http://tinyurl.com/ypmy3

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"lior03 " wrote in message
...
hello
i have a macro that give a list of all sheett name in a workbook
how can i add a clickable link to the code so every time i click on a
sheet name it jump to it
moshe
my code
Sub sheetret()
Application.ScreenUpdating = False
Dim shtsNumber, sh As Integer
shtsNumber = Sheets.Count
ActiveCell.Select
ActiveCell.FormulaR1C1 = "sheet list"
ActiveCell.Font.ColorIndex = 3
ActiveCell.Offset(1, 0).Activate
For sh = 1 To shtsNumber
ActiveCell.Offset(sh - 1, 0).Value = Sheets(sh).Name
Next sh
With selection.Font
Italic = True
Bold = True
End With
boldera
SortWorksheets
fifts
Application.ScreenUpdating = True
End Sub


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default hyperlink

Hi,

Just another method if you want to show inbuilt sheet activate dialog
box from your macro.


Sub MoreSheets()
Dim myctl As CommandBarButton

'find the control id 957 that shows inbuilt sheet activate dialogbox
Set myctl = CommandBars.FindControl(Type:=msoControlButton, ID:=957)

If myctl.Parent.Controls.Count = 16 Then
'if it is not added to toolbar then add it so we may use it
afterwards.
'if it is added then parent.control count < 16 but may be = 23 or ?

'checked it in xl-2000
'for i= 1 to myctl.Parent.Controls.Count
'debug.print myctl.Parent.controls(i).caption
'next


Set myctl = CommandBars("Standard").Controls.Add _
(Type:=msoControlButton, befo=1, ID:=957, Temporary:=True)
End If

myctl.Style = msoButtonCaption
myctl.Execute

End Sub


To popup sheet names.

Sub SheetNamePopup()
Application.CommandBars("workbook tabs").ShowPopup
End Sub



Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hyperlink

Look in Excel (not VBA) help at the hyperlink worksheetfunction. You could
have your macro add this in the next cell, keying off the sheetname.

--
Regards,
Tom Ogilvy

"lior03 " wrote in message
...
hello
i have a macro that give a list of all sheett name in a workbook
how can i add a clickable link to the code so every time i click on a
sheet name it jump to it
moshe
my code
Sub sheetret()
Application.ScreenUpdating = False
Dim shtsNumber, sh As Integer
shtsNumber = Sheets.Count
ActiveCell.Select
ActiveCell.FormulaR1C1 = "sheet list"
ActiveCell.Font.ColorIndex = 3
ActiveCell.Offset(1, 0).Activate
For sh = 1 To shtsNumber
ActiveCell.Offset(sh - 1, 0).Value = Sheets(sh).Name
Next sh
With selection.Font
Italic = True
Bold = True
End With
boldera
SortWorksheets
fifts
Application.ScreenUpdating = True
End Sub


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste Hyperlink result as working hyperlink Bod Excel Worksheet Functions 2 January 22nd 10 04:22 AM
Can't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
reading html when hyperlink address not hyperlink text diplayed Kevin Excel Programming 1 December 4th 03 10:13 PM


All times are GMT +1. The time now is 04:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"