Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Display a StockChart In UserForm

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
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
userform display tkraju via OfficeKB.com Excel Programming 0 May 7th 09 07:23 PM
display userform at certain time Anthony Excel Worksheet Functions 2 October 29th 08 04:21 PM
Can't Display Userform WLMPilot Excel Programming 2 January 30th 08 10:32 PM
display userform Anthony Excel Discussion (Misc queries) 3 February 27th 07 04:02 PM
How to cause userform to display Jim[_31_] Excel Programming 4 November 28th 03 11:00 PM


All times are GMT +1. The time now is 06:50 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"