Web queries produce hyperlinks in Excel 
Author Message
 Web queries produce hyperlinks in Excel

I've written web queries to pull down htm files from a web site and
many of the data elements become hyperlinks on my spreadsheet.  I want
only the text or values, not hyperlinks to go back to the web?  What am
I doing wrong?  Excel97 SR2 Windows95 TIA
--
Ctrl-Alt-Dlt-Hlp ?)?

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 Web queries produce hyperlinks in Excel
When my code loads an html file, I have it break the links.  This is
what I use:

' --------------------------
Sub NukeHyperLinks()
''' Kills hyperlinks in the worksheet, but keeps them blue and
underlined
Dim hypo As Hyperlink, hypoaddress As String

For Each hypo In ActiveSheet.Cells.Hyperlinks
    Debug.Print hypo.Address, hypo.name, hypo.Parent.Address
    hypoaddress = hypo.Parent.Address
    hypo.Delete
    With Range(hypoaddress).Font
        .ColorIndex = 41
        ''' 5: Blue, 41: Faded Blue, 13: Purple
        .Underline = True
    End With
Next
Set hypo = Nothing
End Sub
' --------------------------

HTH,
- Jon
_______

Quote:

> I've written web queries to pull down htm files from a web site and
> many of the data elements become hyperlinks on my spreadsheet.  I want
> only the text or values, not hyperlinks to go back to the web?  What am
> I doing wrong?  Excel97 SR2 Windows95 TIA
> --
> Ctrl-Alt-Dlt-Hlp ?)?

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 19 Feb 2003 05:01:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using excel to produce charts on the web

2. Obtain the URL of a hyperlink imported by a web query

3. Producing a query which combines data from 2 queries

4. Excel 2002 web queries in Excel 97

5. Excel hyperlinks to Web Pages

6. web query works in Excel 2000 but not on Excel XP

7. Excel, Hyperlink to another sheet, save as web page

8. Hyperlinks on Excel Web Pages

9. Excel hyperlinks to Web Pages

10. Calling Excel gurus! - Excel web query and formatting


 
Powered by phpBB® Forum Software © phpBB Group