I am having issues with linking to another sheet within a workbook. In outlook for Mac the whole cell is clickable, but in Windows only the text is clickable. I would like the whole cell to always be clickable.
我在连接到工作簿中的另一个表时遇到了问题。在Mac的outlook中,整个单元格都是可点击的,但在Windows中,只有文本是可点击的。我希望整个单元格都是可点击的。
Here is my cell formula:
这是我的细胞配方:
=HYPERLINK("#'Criteria'!A1", "Criteria")
=超链接(“#“标准”!A1”、“标准”)
Why would this render differently between mac and windows?
为什么mac和windows之间的渲染会不同?
2 个解决方案
#1
1
You can use the Worksheet_SelectionChange event to get it to follow the hyperlink within that cell when you click the cell
您可以使用Worksheet_SelectionChange事件,让它在单击单元格时跟随该单元格中的超链接
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Hyperlinks.Count > 0 Then
Target.Hyperlinks(1).Follow
End If
End Sub
I've uploaded the example for download here: https://app.pathio.com/bjoernstiel/Hyperlink.xlsm
我在这里上传了下载示例:https://app.pathio.com/bjoernstiel/Hyperlink.xlsm
#2
0
This is how Windows [desktop] Excel behaves. Even a cell hyperlink (select cell, right-click, hyperlink) will only have the characters in the cell as a clickable link.
这就是Windows[桌面]Excel的工作方式。即使是单元格超链接(选择单元格、右键单击、超链接)也只能将单元格中的字符作为可单击的链接。
If you have no text in the cell, the entire cell will be the hyperlink. Even if you have no cell value and change only the format in a custom fashion, only the text will be a clickable hyperlink.
如果单元格中没有文本,则整个单元格将是超链接。即使您没有单元格值,只更改定制样式的格式,也只有文本将是可单击的超链接。
While you could use a worksheet_change event, as Jeeped described, that sounds like more of a PITA then I'd recommend.
虽然您可以使用worksheet_change事件,如Jeeped所描述的那样,这听起来更像一个PITA,然后我建议。
Another workaround would be to use a shape, which is sized/placed over the boundaries of the cell, and hyperlink the shape.
另一种解决方法是使用一个形状,该形状的大小/放置在单元格的边界上,并对该形状进行超链接。
#1
1
You can use the Worksheet_SelectionChange event to get it to follow the hyperlink within that cell when you click the cell
您可以使用Worksheet_SelectionChange事件,让它在单击单元格时跟随该单元格中的超链接
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Hyperlinks.Count > 0 Then
Target.Hyperlinks(1).Follow
End If
End Sub
I've uploaded the example for download here: https://app.pathio.com/bjoernstiel/Hyperlink.xlsm
我在这里上传了下载示例:https://app.pathio.com/bjoernstiel/Hyperlink.xlsm
#2
0
This is how Windows [desktop] Excel behaves. Even a cell hyperlink (select cell, right-click, hyperlink) will only have the characters in the cell as a clickable link.
这就是Windows[桌面]Excel的工作方式。即使是单元格超链接(选择单元格、右键单击、超链接)也只能将单元格中的字符作为可单击的链接。
If you have no text in the cell, the entire cell will be the hyperlink. Even if you have no cell value and change only the format in a custom fashion, only the text will be a clickable hyperlink.
如果单元格中没有文本,则整个单元格将是超链接。即使您没有单元格值,只更改定制样式的格式,也只有文本将是可单击的超链接。
While you could use a worksheet_change event, as Jeeped described, that sounds like more of a PITA then I'd recommend.
虽然您可以使用worksheet_change事件,如Jeeped所描述的那样,这听起来更像一个PITA,然后我建议。
Another workaround would be to use a shape, which is sized/placed over the boundaries of the cell, and hyperlink the shape.
另一种解决方法是使用一个形状,该形状的大小/放置在单元格的边界上,并对该形状进行超链接。