Solved

Screen Scrapping from Visual Basic

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

910 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

23 Experts available now in Live!

Get 1:1 Help Now