12 Şubat 2015 Perşembe

Excel VBA Hücreye link verme

Sub linkverdene()
   Dim S1 As Worksheet
   Dim S2 As Worksheet
   Set S1 = Worksheets("Sayfa1")
   Set S2 = Worksheets("Sayfa2")
   Call linkver(S1.Cells(1, 1),S2.Cells(1, 1))
   Call linkver(S2.Cells(1, 1),S1.Cells(2, 1))
End Sub
  
Function linkver(nereye As Range, neresi As Range)
     Dim adres As String
     adres = neresi.Address(RowAbsolute:=False)
     Mid(adres, 1, 1) = "!"
     adres = neresi.Worksheet.Name & adres
     nereye.Hyperlinks.Add nereye, Address:="", SubAddress:=adres, ScreenTip:=adres

End Function

Hiç yorum yok:

Yorum Gönder