Ciao
si e mi faccio risentire.
Per FARA: leggi quanto ti ho scritto il 28/06/13 alle ore 16:09
Moderatori: Anthony47, Flash30005
Attenzione
Il codice ISIN deve essere lungo 12 caratteri
Premi qui per ritornare alla pagina precedente
Option Explicit
Public Indirizzo As String
Sub Aggiorna_Crea_Query_Buona()
Dim I As Integer, UR As Integer, RR As Integer, Nome_Foglio As String, Nome_Query As String
Dim WS As Worksheet, Inserita As Integer
Set WS = Sheets("Foglio0")
UR = WS.Range("A" & Rows.Count).End(xlUp).Row
For I = 2 To UR
Nome_Foglio = WS.Cells(I, 1)
Indirizzo = WS.Cells(I, 2)
Sheets(Nome_Foglio).Select
RR = Range("A" & Rows.Count).End(xlUp).Row
Range("A2:Z" & RR).ClearContents
Range("A1").Select
Range("Z1") = "'" & Indirizzo
On Error GoTo Errore
With Selection.QueryTable
.Connection = "URL;http://" & Indirizzo
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Next I
If Inserita > 0 Then
MsgBox "Aggiornamento effettuato" & vbCrLf & vbCrLf & "Inserite '" & Inserita & "' query"
Else
MsgBox "Aggiornamento effettuato"
End If
Exit Sub
Errore:
Call Inserisci_Query
Inserita = Inserita + 1
Resume
End Sub
Sub Inserisci_Query()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://" & Indirizzo, Destination:=Range("$A$1"))
' .Name = "30"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone ' xlWebFormattingAll
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
Torna a Applicazioni Office Windows
Supporto per Macro Query import pdf to excel Autore: JanVathek |
Forum: Applicazioni Office Windows Risposte: 10 |
Condizioni IIF nelle Query di Access Autore: GelriccaSud |
Forum: Applicazioni Office Windows Risposte: 2 |
Power query - scarire stessa tabella da più link Autore: Denis7 |
Forum: Applicazioni Office Windows Risposte: 2 |
Visitano il forum: Nessuno e 100 ospiti