Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ernesta Fernandez   on Feb 04 In MS Office Category.

  
Question Answered By: Ulfah Hashmi   on Feb 04

I recorded the process and it produced a macro like this:

Sub Macro2()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.mydearfriend.net", Destination:=Range("D4"))
.Name = "www.mydearfriend"
.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 = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

You could use vba  to put whatever values you wanted into this command and it
would probably work to put the data  into your spreadsheet.

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on "New Web Query" question Or get search suggestion and latest updates.


Tagged: