Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Help with code: Web query for security agreement

Hello,

I am trying to make a web query to access a website and download
natural gas market data. I am to the point where I almost have the
code, (thanks to help on this site). Any more input would be greatly
appreciated.

I need to access https://www.services.nymex.com/otcse.../OTCSettle.jsp,
agree to the User agreement and click the link "Download all available
OTC settlement data" I then need to open the .csv file and copy it
into my excel sheet. I am having trouble clicking submit on the first
page Here is the code I have so far, any help???

Thanks so much!

___________________

Sub Basis_web_query()

Dim ie As Object
Dim nFile As Integer

Set ie = CreateObject("InternetExplorer.Application")


ie.Visible = True
ie.Navigate "https://www.services.nymex.com/otcsettlement/
OTCSettle.jsp"
Do Until ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'Agrees with the Disclaimer form
If ie.LocationURL Like "*disclaimer*" Then
'Selects 'I agree'
ie.Document.Links(4).Click

'submits the form
[[[PROBLEM HERE!!!]]]

End If

Do Until ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'clicks on "Download all available..."
ie.Document.all.Item("ctl00_btnExport").Click
'
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Help with code: Web query for security agreement

Try:

ie.Document.getElementById("aspnetForm").submit

Tim

wrote in message
...
Hello,

I am trying to make a web query to access a website and download
natural gas market data. I am to the point where I almost have the
code, (thanks to help on this site). Any more input would be greatly
appreciated.

I need to access
https://www.services.nymex.com/otcse.../OTCSettle.jsp,
agree to the User agreement and click the link "Download all available
OTC settlement data" I then need to open the .csv file and copy it
into my excel sheet. I am having trouble clicking submit on the first
page Here is the code I have so far, any help???

Thanks so much!

___________________

Sub Basis_web_query()

Dim ie As Object
Dim nFile As Integer

Set ie = CreateObject("InternetExplorer.Application")


ie.Visible = True
ie.Navigate "https://www.services.nymex.com/otcsettlement/
OTCSettle.jsp"
Do Until ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'Agrees with the Disclaimer form
If ie.LocationURL Like "*disclaimer*" Then
'Selects 'I agree'
ie.Document.Links(4).Click

'submits the form
[[[PROBLEM HERE!!!]]]

End If

Do Until ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'clicks on "Download all available..."
ie.Document.all.Item("ctl00_btnExport").Click
'
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Help with code: Web query for security agreement

That did the trick! Thanks so much!

On Jan 3, 8:22 pm, "Tim Williams" <timjwilliams at gmail dot com
wrote:
Try:

ie.Document.getElementById("aspnetForm").submit

Tim

wrote in message

...

Hello,


I am trying to make a web query to access a website and download
natural gas market data. I am to the point where I almost have the
code, (thanks to help on this site). Any more input would be greatly
appreciated.


I need to access
https://www.services.nymex.com/otcse.../OTCSettle.jsp,
agree to the User agreement and click the link "Download all available
OTC settlement data" I then need to open the .csv file and copy it
into my excel sheet. I am having trouble clicking submit on the first
page Here is the code I have so far, any help???


Thanks so much!


___________________


Sub Basis_web_query()


Dim ie As Object
Dim nFile As Integer


Set ie = CreateObject("InternetExplorer.Application")


ie.Visible = True
ie.Navigate "https://www.services.nymex.com/otcsettlement/
OTCSettle.jsp"
Do Until ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop


'Agrees with the Disclaimer form
If ie.LocationURL Like "*disclaimer*" Then
'Selects 'I agree'
ie.Document.Links(4).Click


'submits the form
[[[PROBLEM HERE!!!]]]


End If


Do Until ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop


'clicks on "Download all available..."
ie.Document.all.Item("ctl00_btnExport").Click
'
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
security of code mike allen[_2_] Excel Programming 4 January 29th 05 04:13 PM
Microsoft Query security John Nordien Excel Programming 1 November 17th 04 12:03 PM
Security Code Jack S[_2_] Excel Programming 2 August 24th 04 06:36 AM
VBA Code Security TJ Walls Excel Programming 16 May 17th 04 10:27 PM
Uaing VBA to query macro security level Joe Excel Programming 1 February 11th 04 06:29 PM


All times are GMT +1. The time now is 09:26 PM.

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

About Us

"It's about Microsoft Excel"