Hi
In below mention code, when i run the macro i get only current data
from web page, I want to retrive data for date entered in B5 cell value.
The form variable name is"TxtDate" in web query.How can i add post form variable in web query.
or any other way to retrive data from web. I will greatly appreciate any help on this.


Sub downloadnav()
Dim wst As Worksheet
Dim StrDate As String
Dim MyPost As String
Const MyUrl As String = "http://www.idbifortis.com/TrackNAV.aspx?lm1=1"
    
'MyPost = "TxtDate=04-Nov-2009"

 StrDate = Range("B5").Text
 MyPost = "TxtDate=" & StrDate

Sheets.Add
ActiveSheet.Name = "temp"
Sheets("temp").Select
       
        With ActiveSheet.QueryTables.Add(Connection:= _
            "URL;" & MyUrl, Destination:=Cells(1, 1))
            .PostText = MyPost
            .BackgroundQuery = True
            .TablesOnlyFromHTML = True
            .Refresh BackgroundQuery:=False
            .SaveData = True
        End With
End Sub