Here's my program so far.
I'm just trying to pull data off yahoo's stock pages. I know Inet_Data has data, and I know it contains "Script". If the lineCode:Private Sub cmdGet_Data_Click() Dim Inet_Data As String Dim Digit As String Dim str As String Dim Index As Integer Dim x As Integer Dim y As Integer Dim Length As Integer Inet_Data = Inet1.OpenURL("http://finance.yahoo.com/q/ae?s=" & tbTicker.Text) 'Find the price x = InStr(Inet_Data, "Script") tbOutput.Text = Mid(Inet_Data, x, 6) End Subis run as is, it doesn't return anything to the x variable. if I change it so it's not case sensitive, ie.Code:x = InStr(Inet_Data, "Script")I get a "type mismatch" error. If I try to put in a starting position, ie.Code:x = InStr(Inet_Data, "Script",1)I get an "invalid procedure call or argument" error. So basically, instr doesn't work for me at all.Code:x = InStr(0,Inet_Data, "Script")
Please help!




Reply With Quote