Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to display stock chart in the excel userform using the following codes but it is not working. I am using a SMF-Add In in the excel. But to display the chart I am not using this function.
Please let me know what I am doing wrong. Private Sub txtSymbol_AfterUpdate() 'show the current trading price of the stock Dim Symbol As String Dim CompanyName Symbol = txtSymbol.Text Dim URL1 As String Dim URL2 As String Dim b() As Byte Dim f As Long URL1 = n1.Text URL2 = "http://stockcharts.com/h-sc/ui?s=AAPL&p=D&b=5&g=0&id=p52540482287" & n1 b() = Inet1.OpenURL(URL2, icByteArray) '/// putting your images url in here ^^^ f = FreeFile Open App.Path & "\img.gif" For Binary Access Write As #f Put #f, , b() Close #f Image1.Picture = LoadPicture(App.Path & "\img.gif") Kill App.Path & "\img.gif" currentPrice = RCHGetYahooQuotes(Symbol, "l1") CompanyName = RCHGetYahooQuotes(Symbol, "n") lblCurrentPrice.Caption = currentPrice(1, 1) lblCompanyName.Caption = RCHGetElementNumber(txtSymbol.Text, 13862) lblVol.Caption = RCHGetElementNumber(txtSymbol.Text, 26) If lblVol.Caption = 500000 Then lblVol.BackColor = vbGreen Else lblVol.BackColor = vbRed End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
userform display | Excel Programming | |||
display userform at certain time | Excel Worksheet Functions | |||
Can't Display Userform | Excel Programming | |||
display userform | Excel Discussion (Misc queries) | |||
How to cause userform to display | Excel Programming |