Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default reading html when hyperlink address not hyperlink text diplayed

The following code works only when the value of E16 is the filename plus path. I need E16 to be a hyperlink such that the display value is different from the actual filename plus path; e.g., display = Metadata, filename plus path = C:\My Documents\demo.htm

How would I modify this code to make this work

Thanks

Kevi

Sub Demo(
Dim ie As Objec
Dim nFile As Intege
Set ie = CreateObject("InternetExplorer.Application"
With i
.Visible = Fals
.Silent = Tru
.Navigate Worksheets("Sheet1").Range("E16").Selec
Do Until Not .Bus
DoEvent
Loo
Worksheets("Sheet1").Range("E1") = .Document.DocumentElement.InnerTex
.Qui
End Wit
Set ie = Nothin
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default reading html when hyperlink address not hyperlink text diplayed

Kevin

Create a hyperlink in E16 and use set it to the webpage you want. Use the
Text To Display box to set up how you want it to read in Excel. Then change
your macro like this

..Navigate Worksheets("Sheet1").Range("E16").Hyperlinks(1).Ad dress


--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Kevin" wrote in message
...
The following code works only when the value of E16 is the filename plus

path. I need E16 to be a hyperlink such that the display value is different
from the actual filename plus path; e.g., display = Metadata, filename plus
path = C:\My Documents\demo.html

How would I modify this code to make this work?

Thanks.


Kevin

Sub Demo()
Dim ie As Object
Dim nFile As Integer
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = False
.Silent = True
.Navigate Worksheets("Sheet1").Range("E16").Select
Do Until Not .Busy
DoEvents
Loop
Worksheets("Sheet1").Range("E1") =

..Document.DocumentElement.InnerText
.Quit
End With
Set ie = Nothing
End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink from html to specific worksheet WayneO Excel Discussion (Misc queries) 0 October 26th 09 10:46 PM
Convert Inserted HTML text as Hyperlink [email protected] Excel Worksheet Functions 3 December 2nd 08 10:48 PM
Seperating hyperlink address from viewable text Aominay Excel Worksheet Functions 5 October 28th 08 04:52 AM
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Hyperlink-Programable replacement of Text with Its Actual Address Kathy Excel Worksheet Functions 2 June 23rd 05 05:39 PM


All times are GMT +1. The time now is 12:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"