1)选中Book1中的单元格
2)输入公式=HYPERLINK("[Book2xls]sheet2!B2","ABC")
如果不同目录下,则要写出路径,比如:
=HYPERLINK("[e:\excel函数示例\Book2xls]sheet2!B2","ABC")在click事件里面加
Try
SystemDiagnosticsProcessStart(">Private Sub yourlabel_Clik()
‘ 在这里写打开、显示图表的代码
End Sub
要看起来像超链接,还需要些修饰:
Private Sub yourlabel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If yourlabelForeColor <> RGB(0, 0, &HFF) Then
yourlabelForeColor = RGB(0, 0, &HFF)
yourlabelFontUnderline = True
yourlabelFontBold = True
End If
End Sub
Private Sub yourlabel背景窗体_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If yourlabelForeColor = RGB(0, 0, &HFF) Then
yourlabelForeColor = &HC0C0C0 ' 灰色。什么颜色随你了。
yourlabelFontUnderline = False
yourlabelFontBold = False
End If
End Sub给你个例子:
Private Declare Function ShellExecute Lib "shell32dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Form_Load()
Label1Caption = ">
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)