Solved

Screen Scrapping from Visual Basic

Posted on 2003-11-24
7
296 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WPF issue with Trigger 2 109
How to Add / Edit Windows Menu 4 62
Problem to open text file 11 113
Interview questions for support of a legacy ASP.NET site 4 59
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

825 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