ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¨D¦U¦ìÀ°À°¤p§Ì[Ãö©ó§ó·sªÑ²¼¹Ïohlcchart]

[µo°Ý] ¨D¦U¦ìÀ°À°¤p§Ì[Ãö©ó§ó·sªÑ²¼¹Ïohlcchart]

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-11-18 14:04 ½s¿è

¥»¤H¦b«Ø¥ß¤@­Ó¤ñ¸û²³æªº¹Ïªºexcel
excel¸Ì­±¤w¸g¦³¤Fuser form¡C
¤p§Ì·N©À¬O: ¦³¤@­Óªí¦³¿ï¶µ1,2,3
¿ï¾Ü«á«öok¡AµM«á·|¦Û°ÊÂà¨ì¬ÛÃöªÑ²¼¹Ïªº¨º¤@­¶
¹Ïªí¥ç·|®Ú¾Ú¨ä¸ê®Æ®w§ó·s
¥»¤H¨Dsub create 1/2/3 chart()¤§¶¡ªº code
©ÎªÌ¦³¤j¤j¯à°÷«ü¥X§ÚVBA¸Ì­±ªº¿ù³B
VBA¥çÀH¤åªþ¤W¡I¤£³Ó·P¿E¡I
Option Explicit

Public analyopt As Integer
Sub main()

    frmselect.Show
    Select Case analyopt
        Case 1
            Call create1chart
        Case 2
            Call create2chart
        Case 3
            Call create3chart
    End Select
        
End Sub
Sub create1chart()
   
End Sub
Sub create2chart()

End Sub
Sub create3chart()

End Sub
vba.rar (36.02 KB)

¦³¤H¥i¥HÀ°À°¦£¶Ü?ÁÂÁ³á!

TOP

¸Õ¸Õ¬Ý
  1. Option Explicit

  2. Public analyopt As Integer
  3. Sub main()

  4.     frmselect.Show
  5.     Select Case analyopt
  6.         Case 1
  7.             chart1.Select
  8.             Application.Calculation = xlAutomatic
  9.         Case 2
  10.             chart2.Select
  11.             Application.Calculation = xlAutomatic
  12.         Case 3
  13.             chart3.Select
  14.             Application.Calculation = xlAutomatic
  15.     End Select
  16.         
  17. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ clayton0403 ©ó 2014-11-18 12:49 ½s¿è

¦^´_ 3# owen06


    ¥ýÁÂÁ§A..¦pªG§Ú·Q­n§ó·s¥L¦Ó¤£¬O¿ï¾Ü¥¦©O?
§Ú³o¼Ë¤l¤ñ¸û½ÆÂø¥h¥´ªº¸Ü¡A¸Ó¦p¦óset data source¸òseriouscollection?
  1. Option Explicit

  2. Public analyopt As Integer
  3. Sub main()

  4.     frmselect.Show
  5.     Select Case analyopt
  6.         Case 1
  7.             Call Histdata1
  8.         Case 2
  9.             Call Histdata2
  10.         Case 3
  11.             Call Histdata3
  12.     End Select
  13.         
  14. End Sub
  15. Sub Histdata1()
  16.     Dim OHLCrange1 As Range
  17.     Dim DateRange1 As Range
  18.    
  19.     With ws1
  20.         .Visible = True
  21.         .Activate
  22.    
  23.             Set OHLCrange1 = .Range("A2, E25")
  24.     End With
  25.    
  26.     Call create1chart(OHLCrange1, DateRange1)
  27.    
  28. End Sub
  29. Sub create1chart(OHLCrange1 As Range, DataRange1 As Range)

  30.     With chart1
  31.         .Visible = True
  32.         .Activate
  33.         .SetSourceData OHLCrange1
  34.         .Deselect
  35.         
  36.     End With

  37. End Sub
  38. Sub Histdata2()
  39.     Dim OHLCrange2 As Range
  40.     Dim DateRange2 As Range
  41.    
  42.     With ws2
  43.         .Visible = True
  44.         .Activate
  45.    
  46.             Set OHLCrange2 = .Range("A2, E47")
  47.             Set DateRange2 = .Range("A2, A47")
  48.     End With
  49.    
  50.     Call create1chart(OHLCrange1, DateRange1)
  51.    
  52. End Sub
  53. Sub create2chart()

  54. End Sub
  55. Sub Histdata3()

  56.    
  57. End Sub

  58. Sub create3chart()

  59. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# clayton0403


    ¤£ª¾¹D³o¼Ë¬O§_¬°§A·Q­nªº¸Ñµª¡H
  1. Option Explicit

  2. Public analyopt As Integer
  3. Sub main()
  4. Dim ANS As Integer
  5. Dim OHLCrange As Range
  6.   frmselect.Show
  7.     Select Case analyopt
  8.         Case 1
  9.             ANS = 1
  10.         Case 2
  11.             ANS = 2
  12.         Case 3
  13.             ANS = 3
  14.     End Select
  15.     Set OHLCrange = Sheets(ANS & "HISTDATA").Range("A2:E" & Sheets(ANS & "HISTDATA").[E65536].End(3).Row)
  16.     Charts(ANS).Select
  17.     With Charts(ANS)
  18.         .Visible = True
  19.         .Activate
  20.         .SetSourceData OHLCrange
  21.         .Deselect
  22.     End With
  23.       
  24. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# owen06


    ¶W·P®¦!!!ÁÂÁ¤j¤jªºÀ°¦£!!!!!!!{:3_48:}

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD