Forum Discussion
Hyperlink to a chart (not to a cell coordinate)
Good morning. Our firm concentrates on providing training for people with disabilities, and I have been developing Excel tools that allow visually impaired individuals to access spreadsheets using the JAWS add-on. I use hyperlinks to assist the user to navigate to various cells on the spreadsheet. There are charts (bar graphs) on the spreadsheet, and when the user clicks on the hyperlink the cursor moves to the cell address, which is behind the chart. A visually impaired user cannot see that there is a chart in front of the cell. Is there a way to hyperlink to the chart itself? Thanks.
4 Replies
- JKPieterseSilver Contributor
Assuming you point each hyperlink to the top-left cell below each chart you could place this code in the ThisWorkbook module to have the chart floating with its top-left corenr on top of that cell selected:
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink) Dim oShp As Shape For Each oShp In Sh.Shapes If oShp.TopLeftCell.Address = Sh.Range(Target.SubAddress).Address Then oShp.Select Exit For End If Next End Sub- Edward MollerCopper Contributor
Hi Jan,
Thank you for the quick reply and solution. I must admit however that you have me at a disadvantage. I don't know what you mean by placing a code in the ThisWorkbook module. Would you be able to provide me with further guidance? Thanks.
Best,
Ed
- JKPieterseSilver ContributorRight-click any sheet's tab and select "View Code". Now the VBA editor of Excel opens. On the left you should see a small window which is called "Project Explorer". In that window yu should see a small folder-like structure with the name of your workbook in there somewhere. Under that project you should have a folder called "Microsoft Excel Objects" andone of the subitems there is "ThisWorkbook". Double-click that item. Then paste my code in the window that just opened.
Mind you, after doing so, save-as your file as Excel workbook with macro's.