VBA¡@µLªk¦b¤@¯ë¢á¢Ö¢Ö¢Ó¢â¤¤°õ¦æ¡H¡H
- ©«¤l
- 27
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 38
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- window7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-12-12
- ³Ì«áµn¿ý
- 2021-4-21
|
VBA¡@µLªk¦b¤@¯ë¢á¢Ö¢Ö¢Ó¢â¤¤°õ¦æ¡H¡H
½Ð°Ý¦U¦ì¤j¤j
¦³µo¥Í¹L¥H¤Uªº±¡§Î¶Ü??
¥H¤Uªþ¤W¹ÏÀɸòµ{¦¡½X
ÁÂÁÂ
- Sub R2R_PLOTALL()
- Dim x, y, z, R As Integer
- Dim CName(10, 10)
- R = 0
- Do While y = "" '¨¾¤î¸ê®Æ¬°ªÅ¥Õ
- y = Application.InputBox("µe¹Ï¦¸¼Æ", "", 1, 350, 150) '¿é¤Jnµe´X±i¹Ï,¹w³]¬°1±i
- If y = "" Then MsgBox "µe¹Ï¦¸¼Æ¤£±o¬°ªÅ¥Õ!!"
- Loop
- '----------------------------------¿é¤J¦U¹Ïªí¬ÛÃö¸ê®Æ(©Ò»Ý¸ê®Æ¦Û¦æ¼W¥[)-----------
- For z = 1 To y
- Do While CName(z, 0) = ""
- CName(z, 0) = Application.InputBox("²Ä" & z & "¹Ï¦W", "", "R2R_CHART." & z, 350, 150) '¿é¤J¹Ïªí¦WºÙ,¹w³]¬°R2R_Ave.G.R.1
- If CName(z, 0) = "" Then MsgBox "½Ð¿é¤J¹Ï¦W!!"
- Loop
- 'Do While CName(z, 1) = ""
- 'CName(z, 1) = Application.InputBox("²Ä" & z & "¹ÏªºY¶b_Scale", "", "0", 350, 150) '¿é¤Jx¶b³Ì¤p®y¼Ð,¹w³]¬°0
- ' If CName(z, 1) = "" Then MsgBox "Y¶b_Scale¤£±o¬°ªÅ¥Õ!!"
- 'Loop '
- 'Do While CName(z, 2) = ""
- ' CName(z, 2) = Application.InputBox("²Ä" & z & "¹ÏªºMaximumScale", "", "1000", 350, 150) '¿é¤Jx¶b³Ì¤j®y¼Ð,¹w³]¬°0
- 'If CName(z, 2) = "" Then MsgBox "MaximumScale¤£±o¬°ªÅ¥Õ!!"
- 'Loop
- Next
- '---------------------------------------------------------------
- For z = 1 To y
- Sheets("R2R_analysis").Select
- ActiveSheet.Shapes.AddChart.Select
- ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
- Application.ScreenUpdating = False
- For x = 2 To Worksheets.Count
- On Error Resume Next '''''' ¿ù»~¸õ¹L
- ActiveChart.SeriesCollection.NewSeries
-
- ActiveChart.SeriesCollection(x - 1).Name = Sheets("¤u§@ªí1 (" & x & ")").Range("U1") ''''.Offset(0, (z - 1))
- ActiveChart.SeriesCollection(x - 1).XValues = Sheets("¤u§@ªí1 (" & x & ")").Range("A2:A20000") ''''.Offset(0, (z - 1))
- ActiveChart.SeriesCollection(x - 1).Values = Sheets("¤u§@ªí1 (" & x & ")").Range("D2:D20000").Offset(0, (z - 2))
- Next
- On Error GoTo 0 '''''''''''''¿ù»~¸õ¹L''''''''
- Application.ScreenUpdating = True
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- ActiveChart.ApplyLayout (4)
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Dim xRg As Range
- Dim xChart As ChartObject
- Set xRg = Range("A20:J50").Offset(0, R)
- Set xChart = ActiveSheet.ChartObjects(z)
- With xChart
- .Top = xRg(z).Top
- .Left = xRg(z).Left
- .Width = xRg.Width
- .Height = xRg.Height
- End With
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- ActiveChart.SetElement (msoElementChartTitleAboveChart)
- Selection.Caption = CName(z, 0)
- ActiveChart.SetElement (msoElementPrimaryValueAxisTitleRotated)
- For x = 2 To Worksheets.Count
- On Error Resume Next '''''' ¿ù»~¸õ¹L
- Selection.Caption = Sheets("¤u§@ªí1 (" & x & ")").Range("C1").Offset(0, (z - 1)) ''''CName(z, 1) ''''''''"G.R.(mm/hr)"
- On Error GoTo 0 '''''''''''''¿ù»~¸õ¹L''''''''
- Next
- ActiveChart.SetElement (msoElementPrimaryCategoryAxisTitleAdjacentToAxis)
- Selection.Caption = "Length(mm)"
- ActiveSheet.ChartObjects(z).Activate
- ActiveChart.Axes(xlCategory).Select
- ActiveChart.Axes(xlCategory).MinimumScale = 0 '''''''CName(z, 1)
- ActiveChart.Axes(xlCategory).MaximumScale = 1000 '''''CName(z, 2)
- ActiveChart.Axes(xlCategory).MajorUnit = 100
- ActiveChart.Axes(xlCategory).MinorUnit = 50
- ActiveChart.Axes(xlCategory).CrossesAt = 0
- ActiveChart.Axes(xlValue).CrossesAt = 0
- ActiveChart.SetElement (msoElementPrimaryValueGridLinesMajor)
- ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesMajor)
- Application.ScreenUpdating = True
- R = R + 10 '¨C±i¹Ïªí¦ì¸m¶¡¹j
- Next
- End Sub
½Æ»s¥N½X |
|
Ian
|
|
|
|
|
- ©«¤l
- 27
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 38
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- window7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-12-12
- ³Ì«áµn¿ý
- 2021-4-21
|
¦^´_ 2# jcchiang
¥i¥H¥Î¤F
·P¿E¤£ºÉ
ÁÂÁÂ |
|
Ian
|
|
|
|
|
- ©«¤l
- 234
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 276
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-7
- ³Ì«áµn¿ý
- 2021-10-7
|
¦^´_ 1# iverson105
¦]R+¼ÆȤ£¦N§Q
§âR2R_PLOTALL()§ï±¼À³¸Ó´N¥i¥H |
|
|
|
|
|
|