Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Post Search

Posted on 2006-06-12
2
166 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

839 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