Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Post Search

Posted on 2006-06-12
2
Medium Priority
?
172 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
[X]
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
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 1500 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…
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…
Suggested Courses

636 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