S
Shaka215
Hi! Here is the code I am using...I don't understand why it's not
working. In ActiveCell.Offset(0, -1) I have a list of URLs. I need for
the results of the query to be dropped in the ActiveCell.Address. It
keeps crashing on me. It's complaining of the following...
Run-time error '1004':
Application-defined or object-defined error
ActiveCell.Offset(1, 0).Select
With ActiveSheet.QueryTables.Add(Connection:=ActiveCell.Offset(0,
-1).Value, Destination:=Range(ActiveCell.Address))
.Name = "csv"
.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
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
working. In ActiveCell.Offset(0, -1) I have a list of URLs. I need for
the results of the query to be dropped in the ActiveCell.Address. It
keeps crashing on me. It's complaining of the following...
Run-time error '1004':
Application-defined or object-defined error
ActiveCell.Offset(1, 0).Select
With ActiveSheet.QueryTables.Add(Connection:=ActiveCell.Offset(0,
-1).Value, Destination:=Range(ActiveCell.Address))
.Name = "csv"
.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
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With