Hi all I am having issues with a code i used to run but now returrns strange data. i am using the following code to open a list of links listed in worksheet 1 in worksheet 2. i can't find the original code that i was using and i'm not sure that this is correct
now when i run this macro instead of getting the contents of each listed link in sheet 2 all i get is this for each link
(note i am in france atm)
Internet Internet opérationnel
Téléphonie Téléphonie active
Télévision Télévision connectée
Version : ########### (censored for public)
Adresse MAC : ##########(as above)
Adresse IP : ##########(as above)
Profil d'accès : neufbox ADSL
i have no idea why this occurring. strange.
any help would be greatly appreciated
thanks
Dan
p.s as i said there could be something crucial missing from this code. as i am a far cry from being vba proficient i have no idea what.
Code:
Sub ImportData()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.greyhound-data.com/login.htm?z=UFFvLs", Destination:=Range( _
"$AZ$1"))
.Name = "login.htm?z=UFFvLs"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Sheets(2).Activate
i = 1
Do Until Sheets(1).Cells(i, 1) = ""
myquery = Sheets(1).Cells(i, 1)
Sheets(2).Cells(1, 1) = myquery
myrow = Sheets(2).UsedRange.Rows.Count + 1
Do
myrow = myrow - 1
Loop Until Sheets(2).Cells(myrow, 1) <> ""
myrow = myrow + 1
With Sheets(2).QueryTables.Add(Connection:= _
"URL;" & myquery, Destination:=Sheets(2).Cells(myrow, 1))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
i= i + 1
Loop
End Sub
now when i run this macro instead of getting the contents of each listed link in sheet 2 all i get is this for each link
(note i am in france atm)
Internet Internet opérationnel
Téléphonie Téléphonie active
Télévision Télévision connectée
Version : ########### (censored for public)
Adresse MAC : ##########(as above)
Adresse IP : ##########(as above)
Profil d'accès : neufbox ADSL
i have no idea why this occurring. strange.
any help would be greatly appreciated
thanks
Dan
p.s as i said there could be something crucial missing from this code. as i am a far cry from being vba proficient i have no idea what.