Hi all...running a small basic sub (built with recorder)
I pass the URL the the sub as a string, but it won't accept it :
I pass the URL the the sub as a string, but it won't accept it :
Rich (BB code):
Sub MyQuery(urlString As String)
'MsgBox urlString
With ActiveSheet.QueryTables.Add(Connection:= _
urlString _
, Destination:=Range("$D$1"))
.Name = _
urlString
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingRTF
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub