Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Code 10
[go: Go Back, main page]

演習10 のユーザーフォーム コード


------ [UserForm1] -------
Private Sub Average_Click()
  Dim A As Single
  
  With Worksheets("Sheet1")
    A = Application.WorksheetFunction.Average(Range("B1:B10"))
    MsgBox "平均は " & A
  End With
End Sub


Private Sub Closed_Click()
  End
End Sub

Private Sub Stdev_Click()
  Dim D As Single
  
  With Worksheets("Sheet1")
    D = Application.WorksheetFunction.Stdev(Range("B1:B10"))
    MsgBox "標準偏差は " & D
  End With
End Sub

Private Sub Sum_Click()
  Dim S As Integer
  
  With Worksheets("Sheet1")
    S = Application.WorksheetFunction.Sum(Range("B1:B10"))
    MsgBox "合計は " & S
  End With
End Sub

                                                                   back top