Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fill out web sites automatically

Hello.

My code can fill out some fields on websites. But it works only on
simple websites.

Most websites have frame- or metaelements and i don't know how to fill
out those websites.

Any hint's?

Greetings from Germany, Andreas.

Option Explicit

Sub Fill_IE()
Dim I As Integer
Dim SW As New ShellWindows
Dim IE As InternetExplorer
Dim Item As Object

'Open an IE and go to a URL
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate
"http://www.marktkauf.de/SiteAssistant.php/15-0-kw40_games"

'Access all explorer windows
For I = 0 To SW.Count - 1
Set IE = SW.Item(I)
Debug.Print
Debug.Print IE.LocationName
Debug.Print IE.LocationURL

'An "normal"-explorer starts with "file", skip that windows
If Left(IE.LocationURL, 4) = "http" Then
'Go through all elements
For Each Item In IE.Document.all
'select only elements that can have input fields
Select Case TypeName(Item)
Case "HTMLSelectElement":
If Item.Type = "radio" Then
'I don't know
End If

Case "HTMLInputElement":
If Item.Type = "text" Then
Select Case Item.Name
Case "forename":
Item.Value = "Andreas"
Case "name":
Item.Value = "Killer"
Case "email":
Item.Value = "
Case Else
Debug.Print TypeName(Item) & " - " & Item.Name
End Select
End If

Case Else:
Debug.Print TypeName(Item)
End Select
Next
End If
Next
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically fill cell value ingalla Excel Worksheet Functions 1 March 28th 07 08:58 PM
Fill Chart Automatically Keteng Charts and Charting in Excel 1 September 30th 06 04:07 PM
dates - automatically fill next day small tom New Users to Excel 3 October 6th 05 08:37 PM
How to automatically fill a column? goseespam@lot New Users to Excel 8 August 7th 05 01:01 AM
automatically fill up a cell? polletje[_4_] Excel Programming 8 January 6th 04 11:15 PM


All times are GMT +1. The time now is 06:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"