Filehost.ro - gazduire fisiere
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
Ana Maria 25 Profile
Femeie
24 ani
Bucuresti
cauta Barbat
35 - 68 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[EXCEL] Add Hyperlink in Active Cell to Active Cell [VBA]

Pagini: 1 Moderat de TRaP, TonyTzu
#1
TRaP
Moderator
Postari: 960
The code below adds a hyperlink in the active cell to the active cell.

I need it with the purpose to hide and show rows upon hyperlink click and I need the cell to remain selected when hyperlink is pressed. See here how that can be done: http://mrrrr.3xforum.ro/post/1918/1/EXC ... Rows_VBA_/


Sub HLNK_ActiveCell()

Dim newRange As Range
Set newRange = Range(ActiveCell, ActiveCell.Offset(numrows, numCols))
     With ActiveSheet
        .Hyperlinks.Add Anchor:=newRange, _
        Address:=.Parent.FullName & "#'" & .Name & "'!" & ActiveCell.Address, _
        TextToDisplay:=ActiveCell.Text
    End With
End Sub


Source:
https://stackoverflow.com/questions/364 ... ctive-cell


 
   
Pagini: 1  
Mergi la