Aracılığıyla paylaş


WorksheetBase.FollowHyperlink Olay

Çalışma sayfasındaki köprüyü tıklattığınızda oluşur.

Ad alanı:  Microsoft.Office.Tools.Excel
Derleme:  Microsoft.Office.Tools.Excel.v4.0.Utilities (Microsoft.Office.Tools.Excel.v4.0.Utilities.dll içinde)

Sözdizimi

'Bildirim
Public Event FollowHyperlink As DocEvents_FollowHyperlinkEventHandler
public event DocEvents_FollowHyperlinkEventHandler FollowHyperlink

Örnekler

Aşağıdaki kod örneği için bir işleyici gösterir FollowHyperlink , tıklatılmış olan geçerli çalışma kitabındaki tüm köprülerin listesini tutar olay artı bu köprüler içeren çalışma sayfalarının adları bir ListBox Denetim.

Bu örnek, bir belge düzeyinde özelleştirme için bulunur.

Private listBox1 As ListBox
Private Sub WorksheetFollowHyperlink()
    listBox1 = Me.Controls.AddListBox(Me.Range("B2", "C3"), _
        "listBox1")
End Sub

Sub Worksheet1_FollowHyperlink(ByVal Target As Excel.Hyperlink) _
    Handles Me.FollowHyperlink
    listBox1.Items.Add(Me.Name & ":" & Target.Address)
End Sub
private ListBox listBox1;

private void WorksheetFollowHyperlink()
{
    listBox1 = this.Controls.AddListBox(
        this.Range["B2", "C3"], "listBox1");

    this.FollowHyperlink += 
        new Excel.DocEvents_FollowHyperlinkEventHandler(
        Worksheet1_FollowHyperlink);
}

void Worksheet1_FollowHyperlink(Excel.Hyperlink Target)
{
    listBox1.Items.Add(this.Name + ":" + Target.Address);
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

WorksheetBase Sınıf

Microsoft.Office.Tools.Excel Ad Alanı