I probably has been 20 years since I regular used Telnet. I forgot t
tell you to use Open to make the connection. At the T Prompt you ca
type Help to get the list of the commands.
I been thinking about your problem for a while a trying to decide th
best method to use. Using Telnet would give you everything you woul
need but you would have to filter out a lot of control characters and
think that is a lot of work.
It is possible to use send key commands to perform that task but I'
not sure how you would do a dump screen to a IE explorer application.
You could do this if the screen was really a terminal (not an I
emulator).
I believe the right solution is to use an IE explorer to do the job.
Actual the real any is to contact the main frame MIS department and se
if they are willing to give you the SQL server web address and directl
access the data. Although we may still be able to find out thi
information indirectly.
What you may want to do is to go to the IE window and either type F1
to gewt the developer tools or go to view - source. the information ma
be in the text data to let you bypass the Terminal and get access to th
database directly which is the easiest method.
I would recommend otherwise, in using code like I posted below.
Sub GetZipCodes()
ZIPCODE = InputBox("Enter 5 digit zipcode : ")
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
URL = "
http://zip4.usps.com/zip4/citytown_zip.jsp"
'get web page
IE.Navigate2 URL
Do While IE.readyState <> 4 And _
IE.busy = True
DoEvents
Loop
Set Form = IE.document.getElementsByTagname("Form")
Set zip5 = IE.document.getElementById("zip5")
zip5.Value = ZIPCODE
Set ZipCodebutton = Form(0).onsubmit
Form(0).submit
Do While IE.busy = True
DoEvents
Loop
Set Table = IE.document.getElementsByTagname("Table")
Location = Table(0).Rows(2).innertext
IE.Quit
MsgBox ("Zip code = " & ZIPCODE & " City/State = " & Location)
End Sub
The code below if you enter the URL will dump of your webpage to excel
I'm not dumping all the properties only the standard ones so you ca
see how to obtain the data from the webpage. You have to modify th
code by entering the URL of your webpage.
Sub Dump()
URL = "enter Your url Here"
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
'get web page
IE.Navigate2 URL
Do While IE.readyState <> 4 Or _
IE.busy = True
DoEvents
Loop
RowCount = 1
For Each itm In IE.document.all
Range("A" & RowCount) = itm.tagname
Range("B" & RowCount) = itm.classname
Range("C" & RowCount) = itm.ID 'comment out line if error
Range("D" & RowCount) = Left(itm.innertext, 1024)
RowCount = RowCount + 1
Next itm
End Su