Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Screen Scrapping from Visual Basic

Posted on 2003-11-24
7
Medium Priority
?
315 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
4 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 200 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 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