S
sal21
i have this macro, is possible to use after
the "click event" (commented in code")? in effect after click the macro
show other table innthe same page...
Sub Importer_tableauPageWeb_V02()
'activate Microsoft HTML Objects Library
'activate Microsoft Internet Controls
'
Dim IE As InternetExplorer
Dim maPageHtml As HTMLDocument
Dim Htable As IHTMLElementCollection
Dim maTable As IHTMLTable
Dim J As Integer, I As Integer, X As Integer, LINEA As Integer,
LINEA2 As Integer
Dim Y As Byte
Dim INP As Object
'Application.ScreenUpdating = False
LINEA = Sheets("FOGLIO3").Cells(65536, 1).End(xlUp).Row
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate
"http://antfat/antfat/ewaf/elencoSbilanci;jsessionid=wQWxQZWblaHUcAaeuCzp2T7"
Do Until IE.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Set maPageHtml = IE.document
AVANTI:
Set Htable = maPageHtml.getElementsByTagName("table") 'objet
type table
For X = 2 To Htable.Length - 1
Y = 2
Set maTable = Htable(X)
For I = Y To maTable.Rows.Length
LINEA = LINEA + 1
For J = 1 To maTable.Rows(I - 1).Cells.Length - 1
Cells(LINEA, J) = maTable.Rows(I -
1).Cells(J).innerText
Next J
If LINEA = 101 + LINEA2 Then
Set INP = IE.document.all.Item("PAGINA_AVANTI")
INP.Click
''''''''''''''''''''''
Do Until IE.readyState = READYSTATE_COMPLETE
DoEvents
Loop
''''''''''''''''''''
LINEA2 = LINEA - 1
GoTo AVANTI
End If
Next I
Next X
ActiveWorkbook.Save
DoEvents
IE.Quit
Set IE = Nothing
'Application.ScreenUpdating = True
End Sub
the "click event" (commented in code")? in effect after click the macro
show other table innthe same page...
Sub Importer_tableauPageWeb_V02()
'activate Microsoft HTML Objects Library
'activate Microsoft Internet Controls
'
Dim IE As InternetExplorer
Dim maPageHtml As HTMLDocument
Dim Htable As IHTMLElementCollection
Dim maTable As IHTMLTable
Dim J As Integer, I As Integer, X As Integer, LINEA As Integer,
LINEA2 As Integer
Dim Y As Byte
Dim INP As Object
'Application.ScreenUpdating = False
LINEA = Sheets("FOGLIO3").Cells(65536, 1).End(xlUp).Row
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate
"http://antfat/antfat/ewaf/elencoSbilanci;jsessionid=wQWxQZWblaHUcAaeuCzp2T7"
Do Until IE.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Set maPageHtml = IE.document
AVANTI:
Set Htable = maPageHtml.getElementsByTagName("table") 'objet
type table
For X = 2 To Htable.Length - 1
Y = 2
Set maTable = Htable(X)
For I = Y To maTable.Rows.Length
LINEA = LINEA + 1
For J = 1 To maTable.Rows(I - 1).Cells.Length - 1
Cells(LINEA, J) = maTable.Rows(I -
1).Cells(J).innerText
Next J
If LINEA = 101 + LINEA2 Then
Set INP = IE.document.all.Item("PAGINA_AVANTI")
INP.Click
''''''''''''''''''''''
Do Until IE.readyState = READYSTATE_COMPLETE
DoEvents
Loop
''''''''''''''''''''
LINEA2 = LINEA - 1
GoTo AVANTI
End If
Next I
Next X
ActiveWorkbook.Save
DoEvents
IE.Quit
Set IE = Nothing
'Application.ScreenUpdating = True
End Sub