#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default web query+vba

Hi i am a beginner of EXcel and VBA coding. Iam trying to access a site which
takes input from the user and displays the data. I have written the following
code but not able to pull the required data into excel. Can anyone please
help me on this.
Private Sub CommandButton2_Click()
Dim ie As Object
Dim objBK As Workbook
Set objBK = Workbooks.Add
With objBK.Worksheets(1)
Set ie = CreateObject("InternetExplorer.Application")

On Error GoTo errHandler
With ie
.navigate "http://data.bls.gov/cgi-bin/srgate"
Do While .busy: DoEvents: Loop
Do While .ReadyState < 4: DoEvents: Loop
With .document.forms(0)
.series_id.Value = " ECU11121I"
.Submit

End With
End With

End With

errHandler:
ie.Quit: Set ie = Nothing

End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems importing from an Access query Mike Excel Discussion (Misc queries) 0 June 20th 06 09:35 PM
changing query source [email protected] Excel Worksheet Functions 2 March 21st 06 08:55 PM
AHHH! Again JAA149 Excel Discussion (Misc queries) 0 October 31st 05 11:36 AM
AHHHH-Get Data from Multiple Excel workbooks JAA149 Excel Discussion (Misc queries) 5 October 30th 05 05:19 PM
"Query cannot be edited by the Query Wizard" PancakeBatter Excel Discussion (Misc queries) 0 April 25th 05 05:59 PM


All times are GMT +1. The time now is 03:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"