Display Worksheet ASP page pop-up

G

Guest

Would somone tell how to display an ASP Page instead of Internet Explorer in
a worksheet upon selecting a Hyperlink field displayed in a column? My
progam imports Data to a worksheet and selects a Hyperlink which opens a web
page in IE 6.0. Instead I would like it to open an ASP pop-up page. How do
you modify the line of code Selection.Hyperlinks(1).Follow (as listed below)
to display in an ASP page instead of IE 6.0 so that I can save it in Text
format.
'----
Sub ImportXML()
Application.CommandBars("Task Pane").Visible = True
ActiveWorkbook.XmlImport URL:= "C:\Data.xml", ImportMap:=
Nothing, Overwrite:=True, Destination:=Range("$A$1")
ActiveWindow.SmallScroll ToRight:=1
Range("E4").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub
'-------
thx,
Ted
 
T

Tim Williams

What does the hyperlink URL look like?

Maybe try NewWindow:=True

You seem to be confusing IE and ASP: these two are apples and oranges.
ASP pages display in IE (or whatever the default browser is): without
the browser nothing will display. A pop-up page is just an IE window
without buttons etc.

Tim
 
G

Guest

My problem is where do I go from here? with -> Selection.Hyperlinks(1).Follow
NewWindow:=TRUE, AddHistory:=True, which initiates the browser in a full
screen. I'd like to execute the hyperlink (http://www.coj.net) in a browser
type pop-up window. Since I have to Save the page displayed here in text
format, I thought that an ASP page? would be the answer?
Ted
 
T

Tim Williams

What do you mean by "display the page in Text format"?

Do you mean you want to get the HTML source of the page? If so, that can be
done but the hyperlink.follow method is not the best solution.

Try this (add a reference to "microsoft XML" in your project):

Function GetSource(sURL) As String


Dim xmlhttp As Object
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")

xmlhttp.Open "GET", sURL, False
xmlhttp.send
GetSource = xmlhttp.responseText
Exit Function
haveError:
GetSource = "Error: " & Err.Description
End Function


Sub test()
MsgBox GetSource("http://www.coj.net")
End Sub





Tim.
 
G

Guest

I need to save-as in text format. In Internet Explorer you can save (the web
page) as text format. However IE sometimes saves all the displayed data in
Text & sometimes it does'nt. Also when the 1st hyperlink is selected from
the worksheet column, the IE Window displays fine resembling a pop-up window
after that all other selects displays in a full IE Window. I' m hoping that
I'll have more consistency & control with an ASP or ASP.net page? Your code
is very helpful which I will certainly use if the above does not work.
Please advise.

Ted
 
T

Tim Williams

What are you trying to do? Maybe going back to why you're doing this would
be useful. I'm not clear on what the aim of all this is.

Tim.
 

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

Similar Threads

macro to open a document 6
Open folder with code 5
Resetting Hyperlink to Worksheet 3
Set Row as Variable... 2
hyperlinks 1
programming a hyperlink 3
Hyperlink Question 9
adding hyperlinks 1

Top