Excel VBA- EXCEL web query

Joined
Sep 14, 2010
Messages
1
Reaction score
0
following is my code

Sub Button1_Click()

A = Worksheets("sheet1").Cells(1, 1).Value
MsgBox A
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.nseindia.com/marketinfo/...strikePrice=&dateRange=day&fromDate=A&toDate=[""Enter End date""]&segmentLink=9&symbolCount=1" _
, Destination:=Range("$A$6"))

.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "4"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False

End With
End Sub



I want to change the code so that a cell value can be provided as "todate" value in the web query.

please help
 
Back
Top