?
Solved

Post Search

Posted on 2006-06-12
2
Medium Priority
?
171 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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
Course of the Month14 days, 13 hours left to enroll

771 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