Sub announcements()
Dim scrip As String
Application.DisplayAlerts = False
scrip = InputBox("type nse code of the scrip")
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://nseindia.com/marketinfo/companyinfo/eod/announcements.jsp?symbol=" & scrip _
, Destination:=Range("A1"))
.Name = "announcements.jsp?symbol=cipla"
.Refresh BackgroundQuery:=False
End With
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\VENKAT\My Documents\" & scrip & " announcements.csv", _
FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = True
End Sub