Sub Macro3()
'
' Macro3 Macro
' Macro enregistrée le 30/01/2011 par stt
'
Dim IE As Object 'InternetExplorer
Dim password, userid, OK As Object 'IHTMLElement
Dim MaPageHtml As Object 'HTMLDocument
Dim login, pwd As String
On Error Resume Next
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate ("http://www.gpro.net/gb/gpro.asp")
Do Until IE.ReadyState = 4
DoEvents
Loop
Set MaPageHtml = IE.Document
'Numéro d'abonné
Set userid = MaPageHtml.getElementsByName("textlogin").Item
userid.Value = login
'mot de passe
Set password = MaPageHtml.getElementsByName("textPassword").Item
password.Value = pwd
'Le Bouton de connexion
Set OK = MaPageHtml.getElementsByName("Logonfake").Item
OK.Click
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.gpro.net/gb/DriverProfile.asp?ID=280", Destination:=Range( _
"A1"))
.Name = "DriverProfile.asp?ID=10886_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "4"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub