Moderatori: Anthony47, Flash30005
For I = 2 To Cells(Rows.Count, 1).End(xlUp).Row
myIsin = Cells(I, 1).Value
myURL = "http://www.borsaitaliana.it/borsa/derivati/ftse-mib-options/dati-completi.html?isin=" & myIsin & "&lang=it"
If Ie Is Nothing Then Set Ie = CreateObject("InternetExplorer.Application")
'
Refr:
With Ie
Debug.Print "------ " & myRetr
.Navigate myURL
.Visible = True
End With
'wait for page...
myRes = ieWaitPage(Ie, 0.5, 40) 'sessione, Stab Time, TimeOut time
'..
'..
'IE Document ora pronto...
Set myColl = Ie.document.getElementsByTagName("TABLE")
If myColl.Length < 4 Then
Cells(I, 2).Value = "Codice non trovato"
SkipCod = True
Else
Cells(I, 2).Value = "Codice trovato, " & Format(Now, "hh:mm:ss")
SkipCod = False
End If
If SkipCod Then GoTo SkipI
'..
'..
For J = 3 To 4
With myColl(J)
For Each TrTr In .Rows
For Each TdTd In TrTr.Cells
Range("B2").Offset(kK, jJ) = TdTd.innertext
jJ = jJ + 1
Next TdTd
kK = kK + 1: jJ = 0
Next TrTr
kK = kK + 1
End With
Next J
Columns("A:E").EntireColumn.AutoFit
SkipI:
kK = 0: jJ = 0
Sheets(myList).Select
Next I
If ActiveSheet.Name <> myIsin Then
ThisWorkbook.Worksheets.Add after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = myIsin
Cells.NumberFormat = "@" '<<< AGGIUNGERE questa
End If
Function IEAvailable() As Boolean
#If VBA7 And Win64 Then
Dim IEStat As LongPtr
#Else
Dim IEStat As Long
#End If
IEAvailable = (InternetGetConnectedState(IEStat, 0&) <> 0)
End Function
Sheets(I & "").Select
Torna a Applicazioni Office Windows
Macro modifica date scelta periodo Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 11 |
Supporto per sviluppo macro VBA Ordinare per data Autore: Carletto Ribolla |
Forum: Applicazioni Office Windows Risposte: 3 |
Macro per aprire file salvato su sharepoint Onedrive Autore: marcopont |
Forum: Applicazioni Office Windows Risposte: 2 |
Visitano il forum: Nessuno e 20 ospiti