Coverting hyperlink cell to the web page address

G

Guest

I have multiple hyperlinks in a document with the same name "safety
document". each calls up the webpage of the associated chemical from the
internet.

I want to convert these links to the actual web address so that I may call
up these addresses using hyperlink(vlookup etc).

Can someone help?
 
G

Guest

Make a back up of your file and test drive this in the spare file...

Press Alt+F11 to display the VBE and then click INSERT in the menu and
select MODULE.

Paste the following sub in the new module:

Sub ShowHLink()

Dim ws As Worksheet
Dim h As Hyperlink
Dim strHLink As String

Set ws = ThisWorkbook.Sheets(1)

For Each h In ws.Hyperlinks
h.TextToDisplay = h.Address
Next h

Set ws = Nothing
Set h = Nothing

End Sub
 
G

Guest

I forgot to add the steps to running the macro:

Click TOOLS on the menu
Click MACRO on the drop-down menu
Click MACROS on the cascade menu
Select the macro named ShowHLink
Click the RUN command button
 

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

Top