Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Re : Excel HyperLinks to WorkSheets & Chart-Sheets

1. Please refer to the following code :-

Set WorkSheetShingle = ActiveSheet.Range("WrkShtIndex").Offset(1,
0).Resize(32, 1)

For Each Cel In WorkSheetShingle.Cells

ShtName = Cel.Value 'Use the Tag-Name of the Sheet ......
ShtDestinAddress = Range("A1").Address 'That is the Cell-
Address at the Destination ......

With ActiveSheet
.Hyperlinks.Add Anchor:=Cel, _
Address:="", _
SubAddress:="#" & Chr(39) & ShtName & Chr(39) & "!" &
ShtDestinAddress, _
ScreenTip:="Move to a Sheet in ActiveWorkBook.", _
TextToDisplay:=Cel.Value
End With

Next Cel

2. WorkSheetShingle is a range of 32 values showing Sheet-Names
(WorkSheets as well as Chart-Sheets).

3. The code works for the WorkSheets ; unfortunately, it stalls at
Chart-Sheets.

4. The culprit is,
SubAddress:="#" & Chr(39) & ShtName & Chr(39) & "!" &
ShtDestinAddress, _

5. Please share your experience to resolve the above.

6. Regards.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,805
Default Re : Excel HyperLinks to WorkSheets & Chart-Sheets

Are you sure it installs at 'Chart' sheets? Also what do you mean by that?

If you have your sheetnames in the range A2:A33, your code should work fine.

For chart sheets, however, it may not work unless you have a cell "A1" on
the chart sheet...

See
http://www.lockergnome.com/windows/2...el-worksheets/
for similar code...


" wrote:

1. Please refer to the following code :-

Set WorkSheetShingle = ActiveSheet.Range("WrkShtIndex").Offset(1,
0).Resize(32, 1)

For Each Cel In WorkSheetShingle.Cells

ShtName = Cel.Value 'Use the Tag-Name of the Sheet ......
ShtDestinAddress = Range("A1").Address 'That is the Cell-
Address at the Destination ......

With ActiveSheet
.Hyperlinks.Add Anchor:=Cel, _
Address:="", _
SubAddress:="#" & Chr(39) & ShtName & Chr(39) & "!" &
ShtDestinAddress, _
ScreenTip:="Move to a Sheet in ActiveWorkBook.", _
TextToDisplay:=Cel.Value
End With

Next Cel

2. WorkSheetShingle is a range of 32 values showing Sheet-Names
(WorkSheets as well as Chart-Sheets).

3. The code works for the WorkSheets ; unfortunately, it stalls at
Chart-Sheets.

4. The culprit is,
SubAddress:="#" & Chr(39) & ShtName & Chr(39) & "!" &
ShtDestinAddress, _

5. Please share your experience to resolve the above.

6. Regards.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Re : Excel HyperLinks to WorkSheets & Chart-Sheets

Sheeloo Esq.,

Thank you for responding to my query.

"Are you sure it installs at 'Chart' sheets?"

I do mean it stalls ...... (meaning, Come to a Standstill)

Then, Excel prompts a warning message,

"Your formula contains an invalid external reference to a worksheet."

Regards.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,805
Default Re : Excel HyperLinks to WorkSheets & Chart-Sheets

Your post indicated that your code was not working... Apparently the link it
creates does not work for chart sheets...

Reason: You can not link to a chart sheet since there is no underlying cell...

There is a workaround however --
Source: http://www.ozgrid.com/Excel/hyperlinks.htm

--------------------------------------
HYPERLINK TO A CHART SHEET

Unfortunately there is no standard way to link to a Chart Sheets. In fact,
Excel will not let you do this. The workaround to this is quite simple though.

1) Add a new Worksheet.

2) On the Worksheet you would like the hyperlink to the Chart sheet on, add
a hyperlink to the new Worksheet. However, the text to display should read
something like: Spending Chart or any applicable text.

3) Activate the newly added Worksheet and go to FormatSheetHide

4) Right click on the hyperlink Worksheet name tab and choose View Code. In
here paste the code below and change "Spending Chart" to suite your specific
text.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)



If Target.TextToDisplay = "Spending Chart" Then Sheets("Spending
Chart").Select



End Sub


--------------------------------------
I think steps 3 & 4 have to be switched.


" wrote:

Sheeloo Esq.,

Thank you for responding to my query.

"Are you sure it installs at 'Chart' sheets?"

I do mean it stalls ...... (meaning, Come to a Standstill)

Then, Excel prompts a warning message,

"Your formula contains an invalid external reference to a worksheet."

Regards.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Re : Excel HyperLinks to WorkSheets & Chart-Sheets

Sheeloo Esq.,

Thank you for responding to my query.

Have attempted your suggestion and it works fine indeed.

Thank you once again.

Regards.


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
Hyperlinks to many Sheets within a Workbook hardeep.kanwar[_11_] Excel Worksheet Functions 5 June 18th 09 08:48 AM
Allowing Chart creation in protected worksheets sheets using VB co Anthony Harding Excel Programming 4 May 9th 07 09:10 PM
macros vs hyperlinks to open excel sheets jjs Excel Programming 1 April 5th 06 10:12 PM
Hyperlinks to other Sheets Nigel Excel Programming 4 August 17th 05 02:24 PM
Hyperlinks on Protected Sheets Rich[_27_] Excel Programming 5 April 7th 05 07:21 PM


All times are GMT +1. The time now is 03:17 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"