View Single Post
  #5  
Old 19th March 2016, 03:30 AM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

Is a bit dirty right now but am sure i can add a bit more functionality to it.

Code:
Sub CopyWebPage() Dim ieApp As Object Dim URL As String URL = "https://www.tab.com.au/racing/2016-03-18/ALBURY/ALB/R/7" Set ieApp = CreateObject("Internetexplorer.Application") ieApp.Navigate URL ieApp.Visible = True While ieApp.Busy And ieApp.ReadyState <> 4: DoEvents: Wend Application.Wait (Now + TimeValue("00:00:05")) 'Select All ieApp.ExecWB 17, 0 'Copy to the clipboard ieApp.ExecWB 12, 0 ieApp.Quit End Sub

This just copies the page, you need to add to it to paste it in excel, you will see a browser open and it waits 5 seconds for the page to load, this can be adjusted to less or more, once the contents copied the browser closes, if you choose not to see the browser change ieApp.Visible = True to False and you won't even see the browser but it will still copy the contents.

you could set up another timer so it runs every 30 seconds to give you some sort of price update.
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote