- ©«¤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
|
¦^´_ 6# iverson105
¥ý¿é¤J©Ò»Ý¸ê®Æ«á,¦A±N¬ÛÃö¸ê®Æ±a¤J¹Ïªí
¦pªG¦³¤£°÷ªº½Ð¨Ì¦¹¤è¦¡¼W¥[nªº¸ê®Æ
Sub ALL_PLOT2()
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_Ave.G.R." & 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 & "¹ÏªºMinimumScale", "", "0", 350, 150) '¿é¤Jx¶b³Ì¤p®y¼Ð,¹w³]¬°0
If CName(z, 1) = "" Then MsgBox "MinimumScale¤£±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 = xlXYScatter
Application.ScreenUpdating = False
For x = 2 To Worksheets.Count
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 - 1))
Next
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)
Selection.Caption = "G.R.(mm/hr)"
ActiveChart.SetElement (msoElementPrimaryCategoryAxisTitleAdjacentToAxis)
Selection.Caption = "Length(mm)"
ActiveSheet.ChartObjects(z).Activate
ActiveChart.Axes(xlCategory).Select
ActiveChart.Axes(xlCategory).MinimumScale = CName(z, 1)
ActiveChart.Axes(xlCategory).MaximumScale = 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 |
|