Solved

Post Search

Posted on 2006-06-12
2
164 Views
Last Modified: 2010-04-30
I have a vendor website that I want to open a search for automatically. I have the web address (http://www.server.com/search.asp) and I have the textfield that needs to be posted (search_text). I want to know how I can press a button in my VB6 app, and it will open IE, go to that search page, and POST the search text so that' their asp page will run the search and return the results.

Thanks in advance.
0
Comment
Question by:DrDamnit
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 16887653
Click on Project --> References and check the "Microsoft Internet Controls" entry.

Option Explicit
 
Private submitted As Boolean
Private WithEvents IE As InternetExplorer

Private Sub Command1_Click()
    If IE Is Nothing Then
        Set IE = CreateObject("InternetExplorer.Application")
        IE.Visible = True
    End If
    submitted = False
    IE.Navigate "http://www.server.com/search.asp"
End Sub

Private Sub IE_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    If Not submitted Then
        IE.Document.All.Item("q").Value = "Idle_Mind Experts Exchange"
        IE.Document.All("sa").Click
        submitted = True
    End If
End Sub

Private Sub IE_OnQuit()
    Set IE = Nothing
End Sub
0
 
LVL 32

Author Comment

by:DrDamnit
ID: 16907864
This is how to automatically fill in a form and hit submit. I want to send data directly to the processing .asp file. Like we do with CURL in PHP.
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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…

863 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