Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub getweather(ByVal location As String, ByRef max As String, ByRef min As String, ByRef description As String, ByRef windspeed As String)
- Dim allweather As String
- allweather = getpageHTML("http://www.weathermonkey.co.uk/postcode/c/" & location & ".php")
- allweather = Mid(allweather, InStr(allweather, "<table"), Len(allweather) - InStr(allweather, "<table"))
- description = Mid(allweather, InStr(allweather, "<b>") + 3, InStr(allweather, "</b>") - InStr(allweather, "<b>") - 3)
- min = Mid(allweather, InStr(allweather, "Min temp:") + 9, InStr(allweather, "&") - InStr(allweather, "Min temp:") - 9)
- allweather = Mid(allweather, InStr(allweather, "Max temp:"), Len(allweather) - InStr(allweather, "Min temp:"))
- max = Mid(allweather, InStr(allweather, "Max temp:") + 9, InStr(allweather, "&") - InStr(allweather, "Max temp:") - 9)
- windspeed = Mid(allweather, InStr(allweather, "Wind speed:") + 11, InStr(allweather, " mph") - InStr(allweather, "Wind speed:") - 11)
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment