Hi everybody,
I am extracting stock information from yahoo site in VBA code.
I want the URL from which the information will be taken to be in accordance with cell C5.
That is, the URL that is in cell C5 is the address from which the information will be taken to Excel.
- Now it looks like this -
With ActiveSheet.QueryTables.Add (Connection: = _
"URL; https: //finance.yahoo.com/quote/TSLA/financials? P = TSLA", Destination: = _
Range ("$ A $ 6"))
.Name = "financials? P = TSLA"
.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
The URL is now fixed. I want to change it according to the value of cell C5.
I would be happy for your help please
I am extracting stock information from yahoo site in VBA code.
I want the URL from which the information will be taken to be in accordance with cell C5.
That is, the URL that is in cell C5 is the address from which the information will be taken to Excel.
- Now it looks like this -
With ActiveSheet.QueryTables.Add (Connection: = _
"URL; https: //finance.yahoo.com/quote/TSLA/financials? P = TSLA", Destination: = _
Range ("$ A $ 6"))
.Name = "financials? P = TSLA"
.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
The URL is now fixed. I want to change it according to the value of cell C5.
I would be happy for your help please