View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default Copy & Paste Hyperlink address into cell

Hi Ron,
You posted in programming so I assumed you are familiar with both
Subroutines and Functions. If not see my pages
http://www.mvps.org/dmcritchie/excel/getstarted.htm
http://www.mvps.org/dmcritchie/excel/install.htm

Macros and Functions are installed in the same manner.

For user defined functions (UDF) , you have to include the workbook
name if they are not in the same workbook.

Macros can be used from the same workbook or from any open
(but hidden) workbook, without specifically including the workbook
name that the macro resides in.

You should be able to use a macro or function supplied for your
request whether you understand it or not. Unless you have
to translate the names of the functions. I'll copy this to
Ron de Bruin in case that is a possible problem.

There are some references to VBA tutorials on my page
http://www.mvps.org/dmcritchie/excel...tm#vbtutorials

Original question for this thread was posted 4hours 42 minutes
before this reply. (for Ron de Bruin's benefit)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Ron van Oijen" wrote in message i.nl...
Hi David,

Thanks for the suggestion. I'm afraid that I'm still very new to Visual
Basic programming, so I think it's about time for me to start looking around
for some good introductory book on the subject. I have looked up the
internet site that you mention, and there I found your Visual Basic
function, where it is called "Function to show hyperlink URL used in another
cell (#URL)" / "Hyperlink Address (#Hyperlinkaddress)". This sounds great to
me, a function that will render the hyperlink visible seems to be exactly
what I need. But the code itself still looks a bit like abacadabra to me and
because I suspect I shall have to adjust the generic code to my specific
situation, I think I shall take a look around in the library.

Thanks again,
Ron,
Groningen, The Netherlands.


"David McRitchie" schreef in bericht
...
Hi Ron,

Function HyperlinkAddress(cell)
On Error Resume Next
HyperlinkAddress = cell.Hyperlinks(1).Address
if hyperlinkaddress = 0 then hyperlinkaddress = ""
End Function

usage:
=HyperlinkAddress(A2)
=personal.xls!hyperlinkaddress('links sheet'!A2)


so you might use continuing from Frank's example, something like

=MID(personal.xls!hyperlinkaddress(A2),FIND("=")+1 ,20)
or
=IF(personal.xls!hyperlinkaddress(A2)="", "",

personal.xls!hyperlinkaddress('links sheet'!A2))



More information on Hyperlinks on
Build Table of Contents, similar listings, working with Hyperlinks
http://www.mvps.org/dmcritchie/excel/buildtoc.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Ron van Oijen" wrote ...
Perhaps I haven't stated the problem as clearly as I should have done.

The
artist name is the only text that is visible in the cell. The hyperlink

is
attached to the artist name, but invisible. It becomes only visible when