Copy Hyperlink from one cell to another using excel programming

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to copy hyperlink property of one cell to another cell using excel
programming.

Thanks in advance.
 
try this code.


Sub test()

a = Range("D16")
ActiveSheet.Hyperlinks.Add Range("D1"), a


End Sub
 
Thanks Joel....

however the scenario is this....

Range 'a' has value "Click" and is linked to "www.testpage.com"

i want to copy it to another Range say 'b'=(different in different scenario)
which is in worksheet 'wkSht' (a variable) and its rows and columns are in
variables 'r, 'c'
 
Is wksht the name of the worksheett or a worksheet object?

Sub test()

a = Range("D16")
worksheets(wkSht).Hyperlinks.Add cells(r,c), a

End Sub

or (if worksheet is an object)

Sub test()

a = Range("D16")
wkSht.Hyperlinks.Add cells(r,c), a

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top