• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

use the relative cell to appear in a macro.

Hi

I have the below.

I would like so that the ''2'!A1" will be dynamic and taken from the cell I am standing on

Is that possible?

>>> use code - tags <<<
Code:
Sub Macro3()
'
' Macro3 Macro
'

'
    Selection.Hyperlinks(1).SubAddress = "'2'!A1"
End Sub

thanks
 
Last edited by a moderator:
Hi, as nothing is dynamic within Excel …​
… but you can obviously use the static Address property of the ActiveCell like you can see in VBA help.​
 
See what returns Activecell.Address with its External parameter to True as explained in VBA help, a must read …​
 
Back
Top