Solved

Screen Scrapping from Visual Basic

Posted on 2003-11-24
7
287 Views
Last Modified: 2013-11-25
Hi ,

I am making an application to get the data scrap from visual basic to HTML page and vice versa.
Pls. help me out. with some code tips how to do that .
0
Comment
Question by:Meenakshibansal
  • 3
7 Comments
 
LVL 9

Expert Comment

by:Dang123
ID: 9819224
Meenakshibansal,
    Can you expand this question a little. What exactly do you want to do? What type of data are you planning to work with? (Large blocks of text, lists of numbers, etc?)
Dang123


0
 

Author Comment

by:Meenakshibansal
ID: 9822344
Hi,
In my application i have got 2 tetboxes and there is commandbutton on Visual basic form .when u click on that button the text u have entered in that 2 textboxes should be transfered to HTML page having 2 textboxes . and same with HTML page.the
0
 
LVL 9

Accepted Solution

by:
Dang123 earned 50 total points
ID: 9824363
Meenakshibansal,
    OK, is this what you are looking for?
Dang123

-------------------------------------------------
Test.html
-------------------------------------------------
<html>
<head>
    <title>Some Test Page</title>
</head>
<body>
    <p>This is box 1</p>
    <textarea NAME="Box1" ROWS="3" COLS="80" wrap="off">
    </textarea>
    <p>This is box 2</p>
    <textarea NAME="Box2" ROWS="3" COLS="80" wrap="off">
    </textarea>
</body>
</html>

-------------------------------------------------
VB App
-------------------------------------------------
In a new project add two text boxes and two command buttons. Paste this code into place on the form (correct the paty to Test.html)
-------------------------------------------------

Option Explicit

Dim oIE As Object

Private Sub Command1_Click()
    Set oIE = CreateObject("InternetExplorer.Application")
    oIE.Visible = True
    oIE.Navigate ("C:\y\Test.html")
    While oIE.Busy: Wend ' wait for page to load...
    oIE.Document.All("box1").Value = Text1.Text
    oIE.Document.All("box2").Value = Text2.Text
End Sub

Private Sub Command2_Click()
    Text1.Text = oIE.Document.All("box1").Value
    Text2.Text = oIE.Document.All("box2").Value
End Sub
0
 
LVL 9

Expert Comment

by:Dang123
ID: 10164365

    Did my code sample do what you needed?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now