第5講 Subプロシージャ
第7話 3つの引数
第6話問題解答例
Private Sub CommandButton1_Click()
Dim h As Long, o As Long, b As Long
h = Cells(5, 2)
o = Cells(6, 2)
b = Cells(7, 2)
f h, o, b
End Sub
Sub f(h As Long, o As Long, b As Long)
Dim w, i As Long
w = 0
For i = h To o Step b
w = w + i
Next
Cells(8, 2) = w
End Sub
Private Sub CommandButton2_Click()
Columns("B:AE").Select
Selection.ClearContents
Cells(1, 1).Select
End Sub
第6話へ 第6講第1話へ
vc++講義へ
vb講義へ
VB講義基礎へ
初心者のための世界で一番わかりやすいVisual C++入門基礎講座へ
初心者のための世界で一番わかりやすいVisual Basic入門基礎講座へ
数学研究室に戻る